interface

FetchSessionInit

interface FetchSessionInit

  • keepAlive?: boolean | { idleTimeout: number; maxIdleSockets: number }

    Connection reuse. false closes every connection after its response. The limits do not apply to HTTP/3 connections.

  • proxy?: FetchProxyOption

    The proxy for the requests of this session.

  • tls?: BunFetchRequestInitTLS

    TLS options for the connections of this session. A request that passes its own tls uses that instead, as a whole.

    A checkServerIdentity given here runs once per connection, and the connection is then shared by the requests of this session.

  • unix?: string

    Send the requests of this session over a Unix socket.