@aws-amplify/core
Version:
Core category of aws-amplify
10 lines (9 loc) • 445 B
TypeScript
/**
* Cache the payload of a response body. It allows multiple calls to the body,
* for example, when reading the body in both retry decider and error deserializer.
* Caching body is allowed here because we call the body accessor(blob(), json(),
* etc.) when body is small or streaming implementation is not available(RN).
*
* @internal
*/
export declare const withMemoization: <T>(payloadAccessor: () => Promise<T>) => () => Promise<T>;