UNPKG

@signumjs/http

Version:
19 lines (18 loc) 626 B
import { Http } from './http'; import { HttpClientOptions } from './httpClientOptions'; /** * Factory for clients of {@link Http} * * @module http */ export declare class HttpClientFactory { /** * Creates an Http instance backed by the platform's native `fetch`. * * Works in browsers, Node.js >= 18, Deno, Bun and Cloudflare Workers. * * @param baseUrl The base/root host url for the adapter, i.e. https://contoso.com * @param options Optional {@link HttpClientOptions} applied to every request. */ static createHttpClient(baseUrl: string, options?: HttpClientOptions): Http; }