1
Fork 0

s/client_add_header/client_default_header/

This commit is contained in:
Drew DeVault 2023-02-12 12:21:03 +01:00
parent fa4defb964
commit d350e8ccd9

View file

@ -23,10 +23,11 @@ export fn client_finish(client: *client) void = {
header_free(&client.default_header); header_free(&client.default_header);
}; };
// Adds a default header which is included on all HTTP requests using a given // Returns the default headers used by this HTTP client, so that the user can
// [[client]]. // examine or modify the net::http defaults (such as User-Agent or
export fn client_add_header(client: *client, name: str, val: str) void = { // Accept-Encoding), or add their own.
header_add(&client.default_header, name, val); export fn client_default_header(client: *client) *header = {
return &client.default_header;
}; };
fn new_request(client: *client, method: str, target: *uri::uri) request = { fn new_request(client: *client, method: str, target: *uri::uri) request = {