Connecting and opening requests are threadsafe. Individual requests are not.
Fields
allocator: Allocator,
ca_bundle: std.crypto.Certificate.Bundle = .{ },
next_https_rescan_certs: bool = true,
When this is true
, the next time this client performs an HTTPS request, it will first rescan the system for root certificates.
connection_pool: ConnectionPool = .{ },
The pool of connections that can be reused (and currently in use).
proxy: ?HttpProxy = null,
Functions
fn connect(client: *Client, host: []const u8, port: u16, protocol: Connection.Protocol) ConnectError!*ConnectionPool.Node
No documentation provided.
fn connectUnproxied(client: *Client, host: []const u8, port: u16, protocol: Connection.Protocol) ConnectUnproxiedError!*ConnectionPool.Node
Connect to
host:port
using the specified protocol. This will reuse a connectio…Connect to
host:port
using the specified protocol. This will reuse a connection if one is already open. This function is threadsafe.
Values
ConnectError | type | |
ConnectUnproxiedError | type | |
RequestError | type | |
connection_pool_size | type | |
default_connection_pool_size | comptime_int | |
protocol_map | undefined |