UNPKG

699 BTypeScriptView Raw
1/**
2 * Makes a POST request to the server with the given data as the payload.
3 * Automatic retries are done based on the values in `retryDelays`.
4 */
5declare function fetchWithRetries(uri: string, initWithRetries?: fetchWithRetries.InitWithRetries | null): Promise<any>;
6
7declare namespace fetchWithRetries {
8 interface InitWithRetries {
9 body?: any;
10 cache?: string | null | undefined;
11 credentials?: string | null | undefined;
12 fetchTimeout?: number | null | undefined;
13 headers?: any;
14 method?: string | null | undefined;
15 mode?: string | null | undefined;
16 retryDelays?: number[] | null | undefined;
17 }
18}
19
20export = fetchWithRetries;