Expand description
type AgentOptions = {
allowH2?: boolean;
bodyTimeout?: number;
connectTimeout?: number;
headersTimeout?: number;
keepAliveTimeout?: number;
localAddress?: string;
maxBufferedRequestBodyBytes?: number;
maxRedirections?: number;
maxResponseSize?: number;
proxy?: ProxyOptions;
tls?: TlsOptions;
}Properties§
- allowH2
Allow HTTP/2.
- bodyTimeout
Time to wait between body chunks.
- connectTimeout
TCP connect timeout.
- headersTimeout
Time to wait for response headers.
- keepAliveTimeout
Idle keep-alive timeout.
- localAddress
Source IP for outgoing connections.
- maxBufferedRequestBodyBytes
Cap on buffered Node
Readablerequest bodies in bytes.- maxRedirections
Max redirect hops. Default is
0to match undici.fetch()performs its own redirect handling; rawrequest()/dispatch()callers must set this to follow redirects.- maxResponseSize
Cap on decoded body in bytes.
- proxy
Proxy configuration.
- tls
TLS settings.
Agent configuration. All options have undici-compatible defaults.