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.32/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
hostname: string
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>
redirect(url: string, status?: Status): this
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