import { IncomingMessage } from 'http'; import { Request } from './http-protocol'; declare const URL_PARTS: unique symbol; declare const QUERY: unique symbol; declare const ORIGINAL_URL: unique symbol; interface UrlParts { url: string; path: string; search: string; query?: Record; } /** * The request of Cell's server: Node's `IncomingMessage` with `path`, `query`, `protocol`, `hostname`, * `ip`, `originalUrl` and `get()`. Computed when read and kept until `url` changes. A request from another * server (a test, a serverless proxy) gets them with {@link HttpRequest.enhance}. */ export declare class HttpRequest extends IncomingMessage { body: any; protected [URL_PARTS]?: UrlParts; protected [QUERY]?: Record; protected [ORIGINAL_URL]?: string; /** `request` with the members of HttpRequest, by changing its prototype as express did. */ static enhance(request: IncomingMessage): Request; get path(): string; get query(): Record; set query(query: Record); get protocol(): 'http' | 'https'; get secure(): boolean; get hostname(): string | undefined; get ip(): string | undefined; get originalUrl(): string; set originalUrl(url: string); get(name: 'set-cookie'): string[] | undefined; get(name: string): string | undefined; header(name: 'set-cookie'): string[] | undefined; header(name: string): string | undefined; protected urlParts(): UrlParts; /** `/a?b=1` → path `/a`, search `?b=1`; an absolute URL (a proxy request) keeps only its path. */ protected static split(url: string): UrlParts; } export {}; //# sourceMappingURL=http-request.d.ts.map