aboutsummaryrefslogtreecommitdiff
path: root/src/http_client_async.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/http_client_async.zig')
-rw-r--r--src/http_client_async.zig13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/http_client_async.zig b/src/http_client_async.zig
index 41b12fce3..853ab8f3d 100644
--- a/src/http_client_async.zig
+++ b/src/http_client_async.zig
@@ -1178,7 +1178,18 @@ pub const AsyncHTTP = struct {
};
const AtomicState = std.atomic.Atomic(State);
- pub fn init(allocator: std.mem.Allocator, method: Method, url: URL, headers: Headers.Entries, headers_buf: string, response_buffer: *MutableString, request_body: []const u8, timeout: usize, callback: HTTPClientResult.Callback, http_proxy: ?URL) AsyncHTTP {
+ pub fn init(
+ allocator: std.mem.Allocator,
+ method: Method,
+ url: URL,
+ headers: Headers.Entries,
+ headers_buf: string,
+ response_buffer: *MutableString,
+ request_body: []const u8,
+ timeout: usize,
+ callback: HTTPClientResult.Callback,
+ http_proxy: ?URL,
+ ) AsyncHTTP {
var this = AsyncHTTP{ .allocator = allocator, .url = url, .method = method, .request_headers = headers, .request_header_buf = headers_buf, .request_body = request_body, .response_buffer = response_buffer, .completion_callback = callback, .http_proxy = http_proxy };
this.client = HTTPClient.init(allocator, method, url, headers, headers_buf);
this.client.timeout = timeout;