import { OutgoingHttpHeaders, RequestOptions as NodeRequestOptions } from 'http'; import { Readable } from 'stream'; export type RequestUrl = string | URL; export type HeaderValue = string | number | readonly string[]; export type HeaderEntries = Iterable; export type HeadersInput = OutgoingHttpHeaders | HeaderEntries; export declare function rewriteUrl(url: string): string; export declare function parseUrl(url: RequestUrl): URL; export declare function normalizeHeaders(headers?: HeadersInput): OutgoingHttpHeaders; export declare function getHeader(headers: OutgoingHttpHeaders, key: string): string | undefined; export declare function getHeaderValues(headers: OutgoingHttpHeaders, key: string): string[]; export declare function hasHeader(headers: OutgoingHttpHeaders, key: string): boolean; export declare function setHeader(headers: OutgoingHttpHeaders, key: string, value: HeaderValue): void; export declare function setHeaderIfMissing(headers: OutgoingHttpHeaders, key: string, value: HeaderValue): void; export declare function inflateBody(content: Buffer, encoding: string): Promise; export declare function inflateStream(stream: Readable, encoding: string): Readable; export declare function isReadable(value: unknown): value is Readable; /** The `Proxy-Authorization` value for credentials in a proxy URL; undefined without them. */ export declare function proxyAuthorization(proxy: URL): string | undefined; export declare function applyProxy(request: NodeRequestOptions, proxyUrl: string | URL, targetUrl: URL, timeout: number): void;