import { ServerRequest } from "https://deno.land/std@0.39.0/http/mod.ts";
Properties
private
_body: Deno.Reader | nullreadonly
body: Deno.ReaderBody of the request.
const buf = new Uint8Array(req.contentLength);
let bufSlice = buf;
let totRead = 0;
while (true) {
const nread = await req.body.read(bufSlice);
if (nread === Deno.EOF) break;
totRead += nread;
if (totRead >= req.contentLength) break;
bufSlice = bufSlice.subarray(nread);
}
Value of Content-Length header. If null, then content length is invalid or not given (e.g. chunked encoding).
done: Deferred<Error | undefined>
headers: Headers
r: BufReader
w: BufWriter