flechette
Version:
A highly configurable wrapper for Fetch API that supports programmatic retries and completely obfuscates promise handling.
6 lines (5 loc) • 598 B
TypeScript
import { RetryAction, SendArgs } from "./flechette";
export declare const checkCodes: (incomingCode: number, referenceCode: any) => boolean;
export declare const combineHeaders: (localHeaders: Record<string, string> | Headers | string[][] | undefined, globalHeaders: Record<string, string> | Headers | string[][] | undefined) => Headers;
export declare const determineRetryAction: (statusCode: number, sentArgs: SendArgs, globalRetryActions: RetryAction[] | undefined) => [RetryAction | undefined, number];
export declare const ignoreRetryPath: (path: string, retryAction: RetryAction) => boolean;