RequestJSON
Dump of the request used to later recreate it
Import
import { RequestJSON } from "@hyper-fetch/core"
Source
Package
Preview
type RequestJSON<Request> = {
abortKey: string;
auth: boolean;
cache: boolean;
cacheKey: string;
cacheTime: number;
cancelable: boolean;
deduplicate: boolean;
deduplicateTime: number | null;
disableRequestInterceptors: boolean | undefined;
disableResponseInterceptors: boolean | undefined;
endpoint: ExtractEndpointType<Request>;
hasMock: boolean;
headers?: HeadersInit;
isMockerEnabled: boolean;
method: ExtractAdapterMethodType<ExtractAdapterType<Request>>;
offline: boolean;
options?: ExtractAdapterOptionsType<ExtractAdapterType<Request>>;
params: ExtractParamsType<Request> | EmptyTypes;
payload: PayloadType<ExtractPayloadType<Request>>;
queryKey: string;
queryParams: ExtractQueryParamsType<Request> | EmptyTypes;
queued: boolean;
requestOptions: RequestOptionsType<ExtractEndpointType<Request>, ExtractAdapterOptionsType<ExtractAdapterType<Request>>, ExtractAdapterMethodType<ExtractAdapterType<Request>>>;
retry: number;
retryTime: number;
staleTime: number;
updatedAbortKey: boolean;
updatedCacheKey: boolean;
updatedQueryKey: boolean;
used: boolean;
}
Structure
RequestJSON
| Name | Type | Description |
|---|---|---|
| abortKey | | |
| auth | | |
| cache | | |
| cacheKey | | |
| cacheTime | | |
| cancelable | | |
| deduplicate | | |
| deduplicateTime | | |
| disableRequestInterceptors | | |
| disableResponseInterceptors | | |
| endpoint | | |
| hasMock | | |
| headers | | |
| isMockerEnabled | | |
| method | | |
| offline | | |
| options | | |
| params | | |
| payload | | |
| queryKey | | |
| queryParams | | |
| queued | | |
| requestOptions | | |
| retry | | |
| retryTime | | |
| staleTime | | |
| updatedAbortKey | | |
| updatedCacheKey | | |
| updatedQueryKey | | |
| used | |