wallet-core/packages/taler-util/src/http-impl.node.d.ts

26 lines
704 B
TypeScript
Raw Normal View History

2023-02-15 23:32:42 +01:00
import { HttpLibArgs } from "./http-common.js";
2023-05-22 18:12:38 +02:00
import {
HttpRequestLibrary,
HttpRequestOptions,
HttpResponse,
} from "./http.js";
2023-02-15 23:32:42 +01:00
/**
* Implementation of the HTTP request library interface for node.
*/
export declare class HttpLibImpl implements HttpRequestLibrary {
2023-05-22 18:12:38 +02:00
private throttle;
private throttlingEnabled;
constructor(args?: HttpLibArgs);
/**
* Set whether requests should be throttled.
*/
setThrottling(enabled: boolean): void;
fetch(url: string, opt?: HttpRequestOptions): Promise<HttpResponse>;
get(url: string, opt?: HttpRequestOptions): Promise<HttpResponse>;
postJson(
url: string,
body: any,
opt?: HttpRequestOptions,
): Promise<HttpResponse>;
2023-02-15 23:32:42 +01:00
}