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.

15 lines (14 loc) 593 B
/// <reference types="node" resolution-mode="require"/> import { LookupFunction } from 'node:net'; import { Agent, Dispatcher, buildConnector } from 'undici'; export type CheckAddressFunction = (ip: string, family: number | string) => boolean; export type HttpAgentOptions = { lookup?: LookupFunction; checkAddress?: CheckAddressFunction; connect?: buildConnector.BuildOptions; }; export declare class HttpAgent extends Agent { #private; constructor(options: HttpAgentOptions); dispatch(options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandlers): boolean; }