Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/entropy/mod.ts>HttpRequest

The core module of Entropy framework for Deno.
Latest
class HttpRequest
Re-export
import { HttpRequest } from "https://deno.land/x/entropy@1.0.0-beta.17/mod.ts";

Constructors

new
HttpRequest(request: Request, info?: Deno.ServeHandlerInfo)

Properties

private
readonly
configurator
private
readonly
cspNonce
private
readonly
encrypter
private
optional
formData: FormData
private
readonly
localizator
private
optional
matchedPattern: RoutePath
private
readonly
routeStore
private
optional
sessionObject: Session
readonly
cookies: Record<string, string>
readonly
headers: Headers
readonly
locale: string
readonly
mode: RequestMode
readonly
nonce: string
readonly
origin: string
readonly
params: Record<string, string | undefined>
readonly
queryParams: Record<string, string>
readonly
session: Session

Methods

boolean(name: string): Promise<boolean>
createRedirect(
destination: RedirectDestination,
variables?: Record<string, unknown>,
statusCode?,
): Promise<Response>
createRedirectBack(variables?: Record<string, unknown>, statusCode?): Promise<Response>
file<TFile = FormFile | FormFile[]>(name: string): Promise<TFile>
files(): Promise<Record<string, FormFile | FormFile[]>>
flash(key: string, value: unknown): Promise<void>
flashed<TValue = unknown>(key: string): Promise<TValue | undefined>
form(): Promise<FormData>
header(name: string): string | undefined
input(name: string): Promise<string | undefined>
integrity(): string
ip(): string | undefined
isAjaxRequest(): boolean
isFormRequest(): Promise<boolean>
isMultipartRequest(): Promise<boolean>
isSecure(): boolean
isStaticFileRequest(): Promise<boolean>
json(): Promise<Record<string, unknown>>
method(): Promise<HttpMethod>
pattern(): string | undefined
port(): number
protocol(): string
queryParam(name: string): string | undefined
queryString(): string
referrer(): string
translate(text: string, quantity?): string
url(): string