import { URL, UrlObject } from 'url' import { Duplex } from 'stream' import Dispatcher from './dispatcher' export { request, stream, pipeline, connect, upgrade, } /** Performs an HTTP request. */ declare function request( url: string | URL | UrlObject, options?: { dispatcher?: Dispatcher } & Omit & Partial>, ): Promise; /** A faster version of `request`. */ declare function stream( url: string | URL | UrlObject, options: { dispatcher?: Dispatcher } & Omit, factory: Dispatcher.StreamFactory ): Promise; /** For easy use with `stream.pipeline`. */ declare function pipeline( url: string | URL | UrlObject, options: { dispatcher?: Dispatcher } & Omit, handler: Dispatcher.PipelineHandler ): Duplex; /** Starts two-way communications with the requested resource. */ declare function connect( url: string | URL | UrlObject, options?: { dispatcher?: Dispatcher } & Omit ): Promise; /** Upgrade to a different protocol. */ declare function upgrade( url: string | URL | UrlObject, options?: { dispatcher?: Dispatcher } & Omit ): Promise;