Skip to main content
Module

x/pogo/main.ts>Response

Server framework for Deno
Go to Latest
class Response
import { Response } from "https://deno.land/x/pogo@v0.5.2/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)
header(name: string, value: string)
location(url: string)
redirect(url: string)
state(name: cookie.Cookie): this
state(name: string, value: string | CookieOptions): this
type(mediaType: string)
unstate(name: string)

Static Methods

wrap(input: Response | ResponseBody | Error)