|
kaycxx-http
HTTP client library
|
Optional HTTP request configuration. More...
#include <kaycxx/http/request_options.hpp>
Public Attributes | |
| std::vector< header > | headers {} |
| Request headers. | |
| std::optional< bool > | follow_redirects {} |
| Whether HTTP redirects are followed. | |
| std::optional< std::size_t > | max_redirects {} |
| Maximum number of redirects to follow. | |
| std::optional< std::chrono::milliseconds > | connect_timeout {} |
| Maximum duration of the connection phase. | |
| std::optional< std::chrono::milliseconds > | request_timeout {} |
| Maximum duration of the complete request. | |
| std::function< void(const transfer_progress &)> | progress {} |
| Callback receiving transfer progress. | |
| std::optional< std::size_t > | max_buffered_response_size {} |
| Maximum size of an internally buffered response body. | |
Optional HTTP request configuration.
Options passed to a request override the corresponding defaults configured on its client. Unset options inherit the client value or, when the client also leaves them unset, the library or libcurl default.
| std::optional<std::chrono::milliseconds> kaycxx::http::request_options::connect_timeout {} |
Maximum duration of the connection phase.
std::nullopt inherits the client setting.
| std::optional<bool> kaycxx::http::request_options::follow_redirects {} |
Whether HTTP redirects are followed.
std::nullopt inherits the client setting.
| std::vector<header> kaycxx::http::request_options::headers {} |
Request headers.
Content-Length and Transfer-Encoding are managed by the client. Multipart requests also manage their outer Content-Type. Request-specific headers replace client headers with the same ASCII case-insensitive name and retain all other client headers.
| std::optional<std::size_t> kaycxx::http::request_options::max_buffered_response_size {} |
Maximum size of an internally buffered response body.
std::nullopt inherits the client setting and zero disables the limit.
| std::optional<std::size_t> kaycxx::http::request_options::max_redirects {} |
Maximum number of redirects to follow.
std::nullopt inherits the client setting.
| std::function<void(const transfer_progress&)> kaycxx::http::request_options::progress {} |
Callback receiving transfer progress.
An empty function inherits the client callback.
| std::optional<std::chrono::milliseconds> kaycxx::http::request_options::request_timeout {} |
Maximum duration of the complete request.
std::nullopt inherits the client setting.