blob: 771dd991cca75a1b1bcf1d68b34ebd2ec2c5900a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
import { HttpLibArgs } from "./http-common.js";
import {
HttpRequestLibrary,
HttpRequestOptions,
HttpResponse,
} from "./http.js";
/**
* Implementation of the HTTP request library interface for node.
*/
export declare class HttpLibImpl implements HttpRequestLibrary {
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>;
}
|