tencent cloud

Tencent Cloud Observability Platform

HTTP

PDF
포커스 모드
폰트 크기
마지막 업데이트 시간: 2025-03-11 19:41:09
HTTP is the http configuration in the global parameter configuration Option.

Field

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?
BasicAuth
Optional; basic authentication.
discardResponseBody?
boolean
Optional; whether to discard response packets.
http2?
boolean
Optional; whether to enable HTTP2.

Samples

Use HTTP Option:
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
}
}


도움말 및 지원

문제 해결에 도움이 되었나요?

피드백