import type { IncomingMessage, Server, ServerResponse } from 'http'; export declare const ServerAware: unique symbol; export declare const HTTP_MIDDLEWARE_PRIORITY: number; /** Node's `IncomingMessage` with what Cell reads from a request (see {@link HttpRequest}). */ export interface Request extends IncomingMessage { /** Always set for a request a server received. */ url: string; method: string; /** Path of the URL without the query, not decoded: `/users/1`. */ readonly path: string; /** Query of the URL, with brackets: `?a[b]=1&c=2&c=3` → `{ a: { b: '1' }, c: ['2', '3'] }`. */ query: Record; /** `https` when the connection is TLS. `X-Forwarded-Proto` is not read. */ readonly protocol: 'http' | 'https'; readonly secure: boolean; /** Host header without the port. */ readonly hostname: string | undefined; /** Address of the client socket. */ readonly ip: string | undefined; /** The URL as the client sent it, before anything rewrote `url`. */ originalUrl: string; /** Set by the body middleware. */ body: any; /** A header, by any case; `referer` and `referrer` are the same. */ get(name: 'set-cookie'): string[] | undefined; get(name: string): string | undefined; header(name: 'set-cookie'): string[] | undefined; header(name: string): string | undefined; } export interface Response extends ServerResponse { /** What the http middleware writes once the handler has run. */ body?: any; } export interface ServerAware { setServer(server: Server): Promise; }