MockerConfigType
Import
import { MockerConfigType } from "@hyper-fetch/core"
Source
Package
Preview
type MockerConfigType = {
requestTime?: number;
responseTime?: number;
timeout?: number;
totalDownloaded?: number;
totalUploaded?: number;
}
Structure
MockerConfigType
| Name | Type | Description |
|---|---|---|
| requestTime | | Simulates how long the request to the server should take (in milliseconds) |
| responseTime | | Indicates how long the response from the server should take (in milliseconds). If their combined total takes longer than provided timeout, each value will be automatically adjusted to last half of the timeout time |
| timeout | | Informs how long the request should take before returning a timeout error (in milliseconds) |
| totalDownloaded | | total number of 'bytes' to be downloaded. |
| totalUploaded | | total number of 'bytes' to be uploaded. |