/** * A request-promise-native compatible HTTP client built on the global fetch. * * Keeps the option object and error shape used by the legacy `request` * ecosystem so callers of HttpClient/RestClient see no interface change: * - resolves with the response body (or the full response with * `resolveWithFullResponse`) * - rejects with an error carrying `.name` (`StatusCodeError`/`RequestError`), * `.statusCode`, `.response` and `.request` * - supports `url`, `method`, `headers`, `body`, `json`, `qs`, `form`, * `formData`, `simple`, `resolveWithFullResponse` and `timeout` */ type RequestClientParams = { url?: string; method?: string; headers?: Record; body?: unknown; json?: unknown; qs?: Record | string; form?: Record; formData?: Record; simple?: boolean; resolveWithFullResponse?: boolean; timeout?: number; }; /** * Create a request-promise-native compatible callable client. * @param [logger] when given, verbose request/response logs are emitted */ export declare const createRequestClient: (logger?: { verbose: (message: string, ...args: unknown[]) => void; } | null) => (params?: RequestClientParams) => Promise; export {};