tencent cloud

Tencent Cloud Observability Platform

HTTP

PDF
Modo Foco
Tamanho da Fonte
Última atualização: 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
}
}


Ajuda e Suporte

Esta página foi útil?

comentários