Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

Response

import { Response } from "https://raw.githubusercontent.com/Caesar2011/denotrain/master/mod.ts";
class Response {
constructor(ctx: Context<any, any>);
private _sent: boolean;
public body: Body | null;
public cookies: {
[_: string]: {
value: string;
options: CookieOptions;
}
| null
;
}
;
public headers: [string, string][];
public mimeType: string;
public response: DenoResponse | undefined;
public status: number;
 
public async _prepareResponse(): Promise<void>;
public async _respond(): Promise<void>;
public addHeader(key: string, value: string): Response;
public deleteCookie(key: string): Response;
async file(filePath: string): Promise<boolean>;
async render(file: string, data?: {
[_: string]: any;
}
): Promise<void>;
public setBody(body: Body): Response;
public setCookie(
key: string,
value: string,
options?: CookieOptions,
): Response;
public setMimeType(mimeType: string): Response;
public setStatus(status: number): Response;
}

§Constructors

§
new Response(ctx: Context<any, any>)
[src]

§Properties

§
_sent: boolean
[src]
§
body: Body | null
[src]
§
cookies: {
[_: string]: {
value: string;
options: CookieOptions;
}
| null
;
}
[src]
§
headers: [string, string][]
[src]
§
mimeType: string
[src]
§
response: DenoResponse | undefined
[src]
§
status: number
[src]

§Methods

§
_prepareResponse(): Promise<void>
[src]
§
_respond(): Promise<void>
[src]
§
addHeader(key: string, value: string): Response
[src]
§
deleteCookie(key: string): Response
[src]
§
file(filePath: string): Promise<boolean>
[src]
§
render(file: string, data?: {
[_: string]: any;
}
): Promise<void>
[src]
§
setBody(body: Body): Response
[src]
§
setCookie(key: string, value: string, options?: CookieOptions): Response
[src]
§
setMimeType(mimeType: string): Response
[src]
§
setStatus(status: number): Response
[src]