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

Context

import { Context } from "https://raw.githubusercontent.com/Caesar2011/denotrain/master/mod.ts";
class Context<S extends object = {
[key: string]: any;
}
, R extends object = {
[key: string]: any;
}
>
{
constructor(request: ServerRequest, app: Application<S, R>);
private ticket: string | null;
public cookies: {
[key: string]: SessionValue;
}
;
public data: R;
public error: any;
public readonly req: Request;
public readonly res: Response;
 
private async generateTicket(): Promise<string>;
private async getTicket(): Promise<string>;
private async validateTicket(str: string): Promise<boolean>;
async _init();
async _prepareResponse();
async _respond();
async endSession();
}

§Type Parameters

§
S extends object = {
[key: string]: any;
}
[src]
§
R extends object = {
[key: string]: any;
}
[src]

§Constructors

§
new Context(request: ServerRequest, app: Application<S, R>)
[src]

§Properties

§
ticket: string | null
[src]
§
cookies: {
[key: string]: SessionValue;
}
[src]
§
data: R
[src]
§
error: any
[src]

§Methods

§
generateTicket(): Promise<string> private
[src]
§
getTicket(): Promise<string> private
[src]
§
validateTicket(str: string): Promise<boolean> private
[src]
§
_init()
[src]
§
_prepareResponse()
[src]
§
_respond()
[src]
§
endSession()
[src]