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.

15 lines 538 B
import { HttpClient, HEADER_USER_AGENT } from './HttpClient.js'; let httpclient; export async function request(url, options) { if (!httpclient) { httpclient = new HttpClient(); } return await httpclient.request(url, options); } export { HttpClient, HEADER_USER_AGENT as USER_AGENT } from './HttpClient.js'; export { MockAgent, ProxyAgent, Agent, Dispatcher, setGlobalDispatcher, getGlobalDispatcher, } from 'undici'; export default { request, USER_AGENT: HEADER_USER_AGENT, }; //# sourceMappingURL=index.js.map