QueueRequest
Import
import { QueueRequest } from "@hyper-fetch/react"
Source
Package
Preview
type QueueRequest<Request> = QueueItemType<Request> & { canceled?: boolean; deleteRequest: () => void; downloading: ProgressType; failed?: boolean; removed?: boolean; startRequest: () => void; stopRequest: () => void; success?: boolean; uploading: ProgressType };
Structure
QueueRequest
| Name | Type | Description |
|---|---|---|
| request | | |
| requestId | | |
| resolved | | Resolved when we receive response |
| retries | | |
| stopped | | |
| timestamp | | |
| canceled | | |
| downloading | | Downloading progress for given request |
| failed | | |
| removed | | |
| success | | |
| uploading | | Uploading progress for given request |
| deleteRequest | | Removes request from the queue |
| startRequest | | Callback which allow to start previously stopped request. |
| stopRequest | | Callback which allow to stop request and cancel it if it's ongoing. |