Skip to main content
Module

x/pogo/main.ts>Response

Server framework for Deno
Latest
class Response
import { Response } from "https://deno.land/x/pogo@v0.6.0/main.ts";

A response represents an outgoing message that will be returned by your server for a corresponding request. Use h.response() to create a response instance.

Constructors

new
Response(options?: ResponseOptions)

Properties

body: ResponseBody
headers: Headers
optional
permanent: () => this
optional
rewritable: (isRewritable?: boolean) => this
status: number
optional
temporary: () => this

Methods

code(statusCode: number)
created(url?: string | URL)
header(name: string, value: string)
location(url: string | URL)
redirect(url: string | URL)
state(name: cookie.Cookie): this
state(name: string, value: string | CookieOptions): this
type(mediaType: string)
unstate(name: string)

Static Methods

wrap(input?: ServerResponse | ResponseBody | Error)