import { IncomingMessage, OutgoingHttpHeader, OutgoingHttpHeaders, ServerResponse } from 'http'; import { HttpHeaders, HttpHeadersType } from '../codes/HttpHeaders'; import { Mimes } from '../codes/Mimes'; import { Intent } from '@dooboostore/simple-boot'; import { URL, URLSearchParams } from 'url'; import { Buffer } from 'buffer'; import { MultipartData } from './datas/MultipartData'; import { ReqFormUrlBody } from './datas/body/ReqFormUrlBody'; import { ReqJsonBody } from './datas/body/ReqJsonBody'; import { ReqHeader } from './datas/ReqHeader'; import { HttpStatus } from '../codes/HttpStatus'; import { SessionManager } from '../session/SessionManager'; import { HttpServerOption } from '../option/HttpServerOption'; import { Blob } from 'node:buffer'; import { HttpMethod } from "../codes"; type Config = { sessionManager?: SessionManager; option: HttpServerOption; }; export declare class RequestResponse { protected resWriteChunk: string | Buffer | undefined; protected reqBodyChunk?: Buffer; protected req: IncomingMessage; protected res: ServerResponse; protected config: Config; protected attributes: Map; constructor(req: IncomingMessage | RequestResponse, res: ServerResponse, config: Config); setAttribute(key: string, value: any): void; getAttribute(key: string): T | undefined; get reqSocket(): import("net").Socket; get reqCookieMap(): Map; reqCookieGet(key: string): string; get reqRemoteAddress(): string | undefined; get reqUrlObject(): URL; get reqUrlPathName(): string; get reqUrl(): string; reqUrlObj(config?: { scheme?: string; host?: string; }): URL; get reqUrlSearchParamTuples(): [string, string][]; get reqUrlSearchParams(): URLSearchParams; get reqUrlSearchParamsObj(): { [p: string]: string | string[]; }; get reqPathSearchParamUrl(): string; get reqReadable(): boolean; get reqIntent(): Intent>; reqHasContentTypeHeader(mime: Mimes | string): boolean; reqHasAcceptHeader(mime: Mimes | string): boolean; reqBodyData(): Promise; resBodyData(): string | Buffer | undefined; reqBodyMultipartFormDataObject(): Promise; reqBodyMultipartFormData(): Promise; reqBodyStringData(): Promise; reqBodyJsonData(): Promise; reqBodyFormUrlData(): Promise; reqBodyReqFormUrlBody(): Promise; reqBodyReqJsonBody(): Promise; resBodyJsonData(): T | null; resBodyStringData(): string; reqMethod(): string; reqIsMethod(method: HttpMethod | string): boolean; reqHeader(key: keyof typeof HttpHeaders | string): string | string[]; get reqHost(): string; get reqHeaderObj(): ReqHeader; reqHeaderFirst(key: HttpHeadersType | string, defaultValue?: string): string; reqAuthorizationHeader(): string; reqRefreshTokenHeader(): string; resStatusCode(code?: undefined): number; resStatusCode(code: number | HttpStatus): RequestResponseChain; resHeader(key: HttpHeadersType | string): string | number | string[]; resHeaderFirst(key: HttpHeadersType | string, defaultValue?: string): string; reqSession(): Promise<{ [key: string]: any; }>; reqSessionSet(key: string, value: any): Promise; reqSessionGet(key: string): Promise; resSetStatusCode(statusCode: number): RequestResponseChain; resWrite(chunk: string | Buffer | any, encoding?: BufferEncoding): RequestResponseChain>; resWriteJson(chunk: any, encoding?: BufferEncoding): RequestResponseChain>; resSetHeader(key: HttpHeadersType | string, value: string | string[]): RequestResponseChain; resAddHeader(key: HttpHeadersType | string, value: string | string[]): RequestResponseChain; resSetHeaders(headers: { [key: string]: string | string[]; }): RequestResponseChain; resAddHeaders(headers: { [key: string]: string | string[]; }): RequestResponseChain; private resEndChunk; resEnd(chunk?: string | Buffer | Blob | ArrayBuffer | Response): Promise; resRedirect(statusCode: number, location: string): void; resWriteHead(statusCode: number, headers?: OutgoingHttpHeaders | OutgoingHttpHeader[] | { [key: string]: string | string[]; }): RequestResponseChain>; resWriteHeadEnd(statusCode: number, headers?: OutgoingHttpHeaders | OutgoingHttpHeader[] | { [key: string]: string | string[]; }): void; resIsDone(): boolean; createRequestResponseChain(data?: T): RequestResponseChain; } export declare class RequestResponseChain extends RequestResponse { result?: T; constructor(req: IncomingMessage, res: ServerResponse, config: Config, result?: T); } export {}; //# sourceMappingURL=RequestResponse.d.ts.map