UNPKG

urllib-next

Version:

Help in opening URLs (mostly HTTP) in a complex world — basic and digest authentication, redirections, cookies and more. Base undici fetch API.

18 lines (17 loc) 1.19 kB
import { HttpClient } from './HttpClient.js'; import { RequestOptions, RequestURL } from './Request.js'; export declare function getDefaultHttpClient(): HttpClient; export declare function request<T = any>(url: RequestURL, options?: RequestOptions): Promise<import("./Response.js").HttpClientResponse<T>>; export declare function curl<T = any>(url: RequestURL, options?: RequestOptions): Promise<import("./Response.js").HttpClientResponse<T>>; export { MockAgent, ProxyAgent, Agent, Dispatcher, setGlobalDispatcher, getGlobalDispatcher, } from 'undici'; export { HttpClient, HttpClient as HttpClient2, HEADER_USER_AGENT as USER_AGENT, RequestDiagnosticsMessage, ResponseDiagnosticsMessage, } from './HttpClient.js'; export { RequestOptions, RequestOptions as RequestOptions2, RequestURL, HttpMethod, FixJSONCtlCharsHandler, FixJSONCtlChars, } from './Request.js'; export { SocketInfo, Timing, RawResponseWithMeta, HttpClientResponse, } from './Response.js'; export { IncomingHttpHeaders, } from './IncomingHttpHeaders.js'; export * from './HttpClientError.js'; declare const _default: { request: typeof request; curl: typeof curl; USER_AGENT: string; }; export default _default;