Add command line options to control HTTP client

http_timeout_ms
http_connect_timeout_ms
http_max_host_open
http_max_concurrent
This commit is contained in:
Karl Seguin
2025-08-06 10:31:30 +08:00
parent 06984ace21
commit 1e612e4166
4 changed files with 131 additions and 16 deletions

View File

@@ -230,11 +230,12 @@ pub fn errorMCheck(code: c.CURLMcode) errors.Multi!void {
}
pub const Opts = struct {
timeout_ms: u31 = 0,
timeout_ms: u31,
max_host_open: u8,
max_concurrent: u8,
connect_timeout_ms: u31,
max_redirects: u8 = 10,
tls_verify_host: bool = true,
connect_timeout_ms: u31 = 5000,
max_concurrent_transfers: u8 = 5,
http_proxy: ?[:0]const u8 = null,
proxy_bearer_token: ?[:0]const u8 = null,
};