@coolio/http
Version:
HTTP networking client
12 lines • 589 B
TypeScript
declare type PromiseFunction<T> = () => Promise<T>;
/**
* This is not a regular cache!
* This function is only used across subsequent executions of parsedBody() on a single HttpResponse.
* To implement cache, make use of interceptors.
*
* @param parsedBody - a promise function returning parsed body, which in most cases can be called only once
* @returns a promise function returning body, it can be called many times
*/
export declare const cacheParsedBody: <T>(parsedBody: PromiseFunction<T>) => PromiseFunction<T>;
export {};
//# sourceMappingURL=parsedBodyCache.helper.d.ts.map