std/http/mod.ts

Deno standard library
Go to Latest
class ServerRequest
import { ServerRequest } from "https://deno.land/std@0.81.0/http/mod.ts?s=ServerRequest";

Properties

private
_body: Deno.Reader | null
[src]
private
_contentLength: number | undefined | null
[src]
private
finalized: boolean
[src]
readonly
body: Deno.Reader
[src]

Body of the request. The easiest way to consume the body is:

const buf: Uint8Array = await Deno.readAll(req.body);
readonly
contentLength: number | null
[src]

Value of Content-Length header. If null, then content length is invalid or not given (e.g. chunked encoding).

done: Deferred<Error | undefined>[src]
headers: Headers[src]
method: string[src]
proto: string[src]
protoMajor: number[src]
protoMinor: number[src]
url: string[src]

Methods

finalize(): Promise<void>[src]
respond(r: Response): Promise<void>[src]