Skip to main content
Version: v7.0.0

MockerConfigType


Import
import { MockerConfigType } from "@hyper-fetch/core"

Preview

type MockerConfigType = {
requestTime?: number;
responseTime?: number;
timeout?: number;
totalDownloaded?: number;
totalUploaded?: number;
}

Structure

MockerConfigType
NameTypeDescription
requestTime
number

Simulates how long the request to the server should take (in milliseconds)

responseTime
number

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
number

Informs how long the request should take before returning a timeout error (in milliseconds)

totalDownloaded
number

total number of 'bytes' to be downloaded.

totalUploaded
number

total number of 'bytes' to be uploaded.

On this page