Field | Type | Description |
maxRedirects? | number | Optional; the maximum number of redirects. |
maxIdleConns? | number | Optional; the maximum number of active connections per VU. |
maxIdleConnsPerHost? | number | Optional; the maximum number of active connections per VU per domain name. |
disableKeepAlives? | boolean | Optional; whether to disable persistent connections. |
headers? | Record<string, string> | Optional; request headers. |
timeout? | number | Optional; the request timeout period in milliseconds. |
basicAuth? | Optional; basic authentication. | |
discardResponseBody? | boolean | Optional; whether to discard response packets. |
http2? | boolean | Optional; whether to enable HTTP2. |
export const option = {http: {maxRedirects: 5,maxIdleConns: 50,maxIdleConnsPerHost: 10,disableKeepAlives: true,headers: {'key': 'value'}timeout: 3000,basicAuth: {username: 'user',password: 'passwd'}discardResponseBody: true,http2: true}}