Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/deno_koa/test/test_deps.ts>ServerRequest

A middleware framework for Deno's http serve🦕. Transplanted from Koa with ❤️
Latest
class ServerRequest
import { ServerRequest } from "https://deno.land/x/deno_koa@v1.0.4/test/test_deps.ts";

Properties

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

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

const buf: Uint8Array = await Deno.readAll(req.body);
conn: Deno.Conn
readonly
contentLength: number | null

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
method: string
proto: string
protoMajor: number
protoMinor: number
url: string

Methods

finalize(): Promise<void>
respond(r: Response): Promise<void>