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