@happy-ts/fetch-t • Docs
@happy-ts/fetch-t / FetchTask
Defines the structure and behavior of a fetch task, including the ability to abort the task and check its status.
Type Parameter | Description |
---|---|
T |
The type of the data expected in the response. |
Property | Modifier | Type | Description | Defined in |
---|---|---|---|---|
aborted |
readonly |
boolean |
Indicates whether the fetch task has been aborted. | defines.ts:27 |
response |
readonly |
FetchResponse <T , any > |
The response of the fetch task, represented as an AsyncResult . |
defines.ts:32 |
abort(reason?): void
Aborts the fetch task, optionally with a reason for the abortion.
Parameter | Type | Description |
---|---|---|
reason ? |
any |
An optional parameter to indicate why the task was aborted. |
void