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

x/hex/src/service/deps.ts>oak.NativeRequest

An ecosystem delivering practices, philosophy and portability.
Go to Latest
class oak.NativeRequest
implements ServerRequest
import { oak } from "https://deno.land/x/hex@0.5.15/src/service/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