mirror of
https://github.com/ziglang/zig.git
synced 2026-01-21 06:45:24 +00:00
std.http.Client: add note about resource management
This commit is contained in:
parent
eb072fa528
commit
c8ba5839f7
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user