import { AppContext } from "https://deno.land/x/bun_tea@v0.0.1-alpha.20/core/context.ts";
Execution context for handlers and all the middlewares
Constructors
new
AppContext(req: Request, config: ZarfConfig<S>)Properties
private
_config: ZarfConfig<S>private
_locals: Sprivate
_middlewares: Array<MiddlewareFunction<S>>private
readonly
_request: Request | nullprivate
_response: Response | nullbody: ParsedBody | null
readonly
headers: Request["headers"]readonly
meta: ContextMetareadonly
method: RouteMethodreadonly
query: URLSearchParams | undefinedreadonly
url: URLMethods
private
getResponseInit(): ResponseInitUse the settings from available Response
details, if there's one (as an outcome of handler processing and middleware execution)
accepts(headerVal: HeaderTypeContent)
after(func: MiddlewareFunction<S>)
isType(headerVal: HeaderTypeContent)
send(body: any, args?: ResponseInit): Promise<Response>
Send the response as string, json, etc. - One sender to rule `em all!
setHeader(headerKey: string, headerVal: string)
setType(headerVal: HeaderTypeContent)
setVary(...headerVals: Array<HeaderVaryContent>)