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

x/deno_nest/modules/oak/mod.ts>NestRequest

Refer to nestjs to realize some common functions for Deno, support hono and oak
Go to Latest
class NestRequest
implements Request
import { NestRequest } from "https://deno.land/x/deno_nest@v3.4.0/modules/oak/mod.ts";

Constructors

new
NestRequest(context: OakContext)

Properties

readonly
method: string
originalContext: OakContext
originalRequest: OakRequest
states: Record<string, any>
readonly
url

Methods

cookies(): Promise<Record<string, string>>
formData(): Promise<FormData>
header(name: string): string | undefined

Get a specific header value

Get all headers

json(): Promise<any>
param(name: string): string | undefined

Get a specific param value. such as /user/:id

params(): Record<string, string>

Get all path params as a key-value object

queries(name: string): string[]

Get multiple query param values

query(name: string): string | undefined

Get a specific query param value

text(): Promise<string>