wikibase-edit
Version:
Edit Wikibase from NodeJS
17 lines • 829 B
TypeScript
import type { AbsoluteUrl } from '../types/common.js';
import type { Agent as HttpAgent } from 'node:http';
import type { Agent as HttpsAgent } from 'node:https';
export type HttpHeaderKey = 'content-type' | 'cookie' | 'user-agent';
export type HttpHeaders = Partial<Record<HttpHeaderKey, string>>;
export type HttpMethodLowerCased = 'get' | 'post' | 'put' | 'delete';
export type HttpMethod = HttpMethodLowerCased | Uppercase<HttpMethodLowerCased>;
export interface CustomFetchOptions {
method?: HttpMethod;
headers?: HttpHeaders;
timeout?: number;
agent?: HttpAgent | HttpsAgent;
body?: string;
}
export type HttpRequestAgent = HttpAgent | HttpsAgent;
export declare function customFetch(url: AbsoluteUrl, { timeout, ...options }?: CustomFetchOptions): Promise<Response>;
//# sourceMappingURL=fetch.d.ts.map