Fish transport config through various types
This commit is contained in:
parent
c76599f71c
commit
5e205199dc
|
@ -31,6 +31,11 @@ export fn client_default_header(client: *client) *header = {
|
|||
return &client.default_header;
|
||||
};
|
||||
|
||||
// Returns the default [[transport]] configuration used by this HTTP client.
|
||||
export fn client_default_transport(client: *client) *transport = {
|
||||
return &client.default_transport;
|
||||
};
|
||||
|
||||
fn new_request(client: *client, method: str, target: *uri::uri) request = {
|
||||
let req = request {
|
||||
method = method,
|
||||
|
|
|
@ -15,6 +15,9 @@ export type request = struct {
|
|||
// List of HTTP request headers.
|
||||
header: header,
|
||||
|
||||
// Transport configuration, or null to use the [[client]] default.
|
||||
transport: nullable *transport,
|
||||
|
||||
// I/O reader for the request body.
|
||||
body: (io::handle | void),
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue