Commit c8ba5839f7

Jan Weidner <jw3126@gmail.com>
2023-09-25 11:17:11
std.http.Client: add note about resource management
1 parent eb072fa
Changed files (1)
lib
std
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;