From c8ba5839f717f80afc66c8d79b930e6474229086 Mon Sep 17 00:00:00 2001 From: Jan Weidner Date: Mon, 25 Sep 2023 11:17:11 +0200 Subject: [PATCH] std.http.Client: add note about resource management --- lib/std/http/Client.zig | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/std/http/Client.zig b/lib/std/http/Client.zig index 8df4525430..ed7c24e931 100644 --- a/lib/std/http/Client.zig +++ b/lib/std/http/Client.zig @@ -1063,6 +1063,7 @@ pub const protocol_map = std.ComptimeStringMap(Connection.Protocol, .{ /// `uri` must remain alive during the entire request. /// `headers` is cloned and may be freed after this function returns. /// +/// The caller is responsible for calling `deinit()` on the `Request`. /// This function is threadsafe. pub fn request(client: *Client, method: http.Method, uri: Uri, headers: http.Headers, options: RequestOptions) RequestError!Request { const protocol = protocol_map.get(uri.scheme) orelse return error.UnsupportedUrlScheme;