Skip to main content
Module

x/aleph/server/api.ts>Request

The Full-stack Framework in Deno.
Go to Latest
class Request
implements APIRequest
import { Request } from "https://deno.land/x/aleph@v0.3.0-alpha.13/server/api.ts";

Constructors

new
Request(
params: Record<string, string>,
)

Properties

readonly
body: Deno.Reader
readonly
conn: Deno.Conn
readonly
cookies: ReadonlyMap<string, string>
readonly
headers: Headers
readonly
method: string
readonly
params: Record<string, string>
readonly
query: URLSearchParams
readonly
r: BufReader
readonly
url: string
readonly
w: BufWriter

Methods

addHeader(key: string, value: string): this
json(
data: any,
replacer?: (
this: any,
key: string,
value: any,
) => any
,
space?: string | number,
): Promise<void>
readBody(type?: "raw"): Promise<Uint8Array>
readBody(type: "text"): Promise<string>
readBody(type: "json"): Promise<any>
readBody(type: "form"): Promise<MultipartFormData>
removeHeader(key: string): this
respond(r: ServerResponse): Promise<void>
send(data?: string | Uint8Array | ArrayBuffer, contentType?: string): Promise<void>
setHeader(key: string, value: string): this
status(code: number): this