Skip to main content
Module

x/aleph/types.ts>APIRequest

The Full-stack Framework in Deno.
Go to Latest
interface APIRequest
import { type APIRequest } from "https://deno.land/x/aleph@v0.2.6/types.ts";

Properties

readonly
method: string
readonly
proto: string
readonly
protoMinor: number
readonly
protoMajor: number
readonly
headers: Headers
readonly
conn: Deno.Conn
readonly
r: Deno.Reader
readonly
w: Deno.Writer
readonly
done: Promise<Error | undefined>
readonly
contentLength: number | null
readonly
body: Deno.Reader
readonly
url: APIRequestURL
readonly
cookies: ReadonlyMap<string, string>

Methods

respond(r: Response): Promise<void>
finalize(): Promise<void>
status(code: number): this
addHeader(key: string, value: string): this
setHeader(key: string, value: string): this
removeHeader(key: string): this
send(data: string | Uint8Array | ArrayBuffer): Promise<void>
json(data: any): Promise<void>
end(code: number): Promise<void>