Skip to main content
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.2/server/api.ts";

Constructors

new
Request(
pathname: string,
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
pathname: string
readonly
query: URLSearchParams
readonly
r: bufio.BufReader
readonly
url: string
readonly
w: bufio.BufWriter

Methods

addHeader(key: string, value: string): this
decodeBody(type: "text"): Promise<string>
decodeBody(type: "json"): Promise<any>
decodeBody(type: "form-data"): Promise<FormDataBody>
json(
data: any,
replacer?: (
this: any,
key: string,
value: any,
) => any
,
space?: string | number,
): Promise<void>
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