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

x/deno_nest/modules/hono/src/request.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.6.1/modules/hono/src/request.ts";

Constructors

new
NestRequest(context: HonoContext)

Properties

readonly
method: string
originalContext: HonoContext
originalRequest: HonoRequest
startTime
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 all query params as a key-value object

query(name: string): string | undefined

Get a specific query param value

text(): Promise<string>