std/http/server_legacy.ts

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

Properties

readonly
body: Deno.Reader
[src]

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

import { ServerRequest } from "https://deno.land/std@0.114.0/http/server_legacy.ts";
import { readAll } from "https://deno.land/std@0.114.0/streams/conversion.ts";

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

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

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

Methods

finalize()[src]
respond(r: Response)[src]