UNPKG

urllib

Version:

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

17 lines (16 loc) 640 B
/// <reference types="node" /> import { LookupFunction } from 'net'; import { Agent } from 'undici'; import { DispatchHandlers } from 'undici/types/dispatcher'; import { BuildOptions } from 'undici/types/connector'; export declare type CheckAddressFunction = (ip: string, family: number | string) => boolean; export declare type HttpAgentOptions = { lookup?: LookupFunction; checkAddress?: CheckAddressFunction; connect?: BuildOptions; }; export declare class HttpAgent extends Agent { #private; constructor(options: HttpAgentOptions); dispatch(options: Agent.DispatchOptions, handler: DispatchHandlers): boolean; }