import { type IncomingMessage, type ServerResponse } from 'http'; import { Stream } from 'stream'; import { type HttpServerConfig } from './HttpServer.js'; import { type HttpDict } from './types.js'; import { type RequestBodyType } from './util.js'; export type HttpResponseBody = Stream | Buffer | ArrayBuffer | Uint8Array | string | object | undefined; export declare class HttpContext { readonly config: HttpServerConfig; readonly request: IncomingMessage; readonly response: ServerResponse; readonly host: string; readonly url: URL; readonly query: HttpDict; readonly requestHeaders: HttpDict; requestBody: any; status: number; responseHeaders: HttpDict; responseBody: HttpResponseBody; startedAt: number; params: Record; state: Record; log: boolean; protected _requestBodyRead: boolean; constructor(config: HttpServerConfig, request: IncomingMessage, response: ServerResponse); get method(): string; get path(): string; getRequestHeader(name: string, fallback?: string): string; setResponseHeader(name: string, value: string | string[]): void; addResponseHeader(name: string, value: string | string[]): void; addResponseHeaders(headers: HttpDict): void; readRequestBody(type?: RequestBodyType): Promise; convertRequestBody(raw: Buffer, type?: RequestBodyType): any; private readRequestBodyRaw; inferRequestBodyType(): RequestBodyType; sendResponse(): void; inferResponseBody(): [string, Buffer | Uint8Array]; }