Skip to main content
Module

x/superdeno/test/deps.ts>Oak.NativeRequest

Super-agent driven library for testing Deno HTTP servers.
Latest
class Oak.NativeRequest
implements ServerRequest
import { Oak } from "https://deno.land/x/superdeno@4.9.0/test/deps.ts";
const { NativeRequest } = Oak;

An internal oak abstraction for handling a Deno native request. Most users of oak do not need to worry about this abstraction.

Constructors

new
NativeRequest(requestEvent: RequestEvent, options?: NativeRequestOptions)

Properties

readonly
body: ReadableStream<Uint8Array> | null
readonly
donePromise: Promise<void>
readonly
headers: Headers
readonly
method: string
readonly
rawUrl: string
readonly
remoteAddr: string | undefined
readonly
request: Request
readonly
url: string

Methods

error(reason?: any): void
getBody(): ServerRequestBody
respond(response: Response): Promise<void>
upgrade(options?: UpgradeWebSocketOptions): WebSocket