/// import type { HttpMethod } from './utils'; import type { Byte } from '@principia/base/Byte'; import type { FIO, IO, UIO } from '@principia/base/IO'; import type * as http from 'http'; import type { Socket } from 'net'; import * as Ma from '@principia/base/Managed'; import * as M from '@principia/base/Maybe'; import * as R from '@principia/base/Record'; import * as Ref from '@principia/base/Ref'; import * as S from '@principia/base/Stream'; import * as NS from '@principia/node/stream'; import { TLSSocket } from 'tls'; import * as Url from 'url'; import { HttpException } from './HttpException'; interface CloseEvent { readonly _tag: 'Close'; } interface DataEvent { readonly _tag: 'Data'; readonly chunk: Buffer; } interface EndEvent { readonly _tag: 'End'; } interface ErrorEvent { readonly _tag: 'Error'; readonly error: Error; } interface PauseEvent { readonly _tag: 'Pause'; } interface ReadableEvent { readonly _tag: 'Readble'; } interface ResumeEvent { readonly _tag: 'Resume'; } export declare type RequestEvent = CloseEvent | DataEvent | EndEvent | ErrorEvent | PauseEvent | ReadableEvent | ResumeEvent; export declare class HttpRequest { readonly ref: Ref.URef; private memoizedUrl; eventStream: Ma.Managed>; constructor(ref: Ref.URef); access(f: (req: http.IncomingMessage) => IO): IO; get headers(): UIO; get method(): UIO; get urlString(): UIO; get url(): FIO; get query(): FIO>; getHeader(name: 'set-cookie'): UIO>>; getHeader(name: string): UIO>; get socket(): UIO; get protocol(): UIO; get secure(): UIO; get ip(): UIO; get stream(): S.Stream; get rawBody(): FIO; get bodyJson(): FIO>; } export {}; //# sourceMappingURL=HttpRequest.d.ts.map