import { Application } from './Contracts/Application'; import { IncomingMessage } from 'node:http'; import { UploadedFile } from './UploadedFile'; export declare class Request { private app; private req; private _session; searchParams: URLSearchParams; private _cookies; private _body; private _files; private _params; private _paramMap; private _auth; private _view; private _route; private _path; private _query; private _all; constructor(app: Application, req: IncomingMessage); private _baseUrl; reset(req: IncomingMessage | null): void; /** * Get the view engine instance. */ get view(): any; set view(value: any); /** * Get the authentication context for the request. */ get auth(): any; set auth(value: any); private ensureSearchParams; /** * Get the base URL (scheme + host) of the request. * Falls back to app.url config if host header is missing. */ baseUrl(): string; /** * Get the application instance. */ getApplication(): Application; /** * Get the underlying Node request. */ getRaw(): IncomingMessage; /** * Get the HTTP method. */ method(): string; /** * Get the request path. */ path(): string; /** * Determine if the current request path matches a pattern. * Supports * as a wildcard. */ is(...patterns: string[]): boolean; /** * Get the full URL (including scheme, host, path, and query). */ fullUrl(): string; /** * Get the URL (including scheme, host, and path) without the query string. */ url(): string; /** * Set the current route instance. */ setRoute(route: any): void; /** * Determine if the current route matches a given name or pattern. */ routeIs(...patterns: string[]): boolean; /** * Get all headers. */ headers(): Record; /** * Get the client IP address. */ ip(): string | undefined; /** * Get a specific header. */ header(name: string): string | string[] | undefined; /** * Get all cookies. */ cookies(): Record; /** * Get a specific cookie. */ cookie(name: string): string | undefined; /** * Get a query parameter. */ query(key: string): any; /** * Set the route parameters. */ setParams(params: any): void; /** * Get all route parameters. */ params(): Record; /** * Get a specific route parameter. */ param(key: string, defaultValue?: string | null): string | null; /** * Set the parsed body (usually set by middleware). */ setBody(body: any): void; /** * Set the uploaded files (usually set by middleware). */ setFiles(files: Record): void; /** * Get an uploaded file by name. */ file(key: string): UploadedFile | null; /** * Get all uploaded files. */ files(): Record; /** * Determine if a file exists on the request. */ hasFile(key: string): boolean; /** * Get an input value from route params, body, or query. */ input(key: string, defaultValue?: any): any; /** * Get the parsed body. */ body(): any; /** * Get all input (query + body). */ all(): any; /** * Get a subset of the input data. */ only(keys: string[]): Record; get session(): any; set session(value: any); /** * Get all input data except for a specified array of keys. */ except(keys: string[]): Record; /** * Get the original incoming message. */ getIncomingMessage(): IncomingMessage; /** * Determine if the current request is asking for JSON. */ wantsJson(): boolean; /** * Determine if the current request is an AJAX request. */ ajax(): boolean; /** * Determine if the current request expects a JSON response. */ expectsJson(): boolean; /** * Validate the request with the given rules. */ validate(rules: Record, messages?: Record): Promise; } //# sourceMappingURL=Request.d.ts.map