|
libfetch 0.0.0
A lightweight asynchronous HTTP/1.1 client library implementing a subset of the WHATWG Fetch API.
|
Functions for configuring requests. More...
Functions | |
| fetch_init_t * | fetch_init_new (void) |
| Create a new request configuration. | |
| void | fetch_init_free (fetch_init_t *init) |
| Free a request configuration. | |
| fetch_init_t * | fetch_init_method (fetch_init_t *init, http_method_t method) |
| Set HTTP method (fluent interface) | |
| fetch_init_t * | fetch_init_headers (fetch_init_t *init, fetch_headers_t *headers) |
| Set request headers (fluent interface) | |
| fetch_init_t * | fetch_init_body (fetch_init_t *init, fetch_body_t *body) |
| Set request body (fluent interface) | |
| fetch_init_t * | fetch_init_timeout (fetch_init_t *init, uint32_t timeout_ms) |
| Set request timeout (fluent interface) | |
| fetch_init_t * | fetch_init_signal (fetch_init_t *init, fetch_abort_controller_t *signal) |
| Set abort signal (fluent interface) | |
Functions for configuring requests.
| fetch_init_t * fetch_init_body | ( | fetch_init_t * | init, |
| fetch_body_t * | body ) |
Set request body (fluent interface)
| init | Init object |
| body | Body object (ownership transferred to init) |
| void fetch_init_free | ( | fetch_init_t * | init | ) |
Free a request configuration.
| init | Init object to free (can be NULL) |
| fetch_init_t * fetch_init_headers | ( | fetch_init_t * | init, |
| fetch_headers_t * | headers ) |
Set request headers (fluent interface)
| init | Init object |
| headers | Headers object (ownership transferred to init) |
| fetch_init_t * fetch_init_method | ( | fetch_init_t * | init, |
| http_method_t | method ) |
Set HTTP method (fluent interface)
| init | Init object |
| method | HTTP method |
| fetch_init_t * fetch_init_new | ( | void | ) |
Create a new request configuration.
| fetch_init_t * fetch_init_signal | ( | fetch_init_t * | init, |
| fetch_abort_controller_t * | signal ) |
Set abort signal (fluent interface)
| init | Init object |
| signal | Abort controller (borrowed reference, init does not own) |
| fetch_init_t * fetch_init_timeout | ( | fetch_init_t * | init, |
| uint32_t | timeout_ms ) |
Set request timeout (fluent interface)
| init | Init object |
| timeout_ms | Timeout in milliseconds |