Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/aleph/server/api.ts>Request

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

Constructors

new
Request(req: ServerRequest, params: URLSearchParams)

Properties

readonly
body: Deno.Reader
readonly
conn: Deno.Conn
readonly
cookies: ReadonlyMap<string, string>
readonly
headers: Headers
readonly
method: string
readonly
params: 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