An HTTP request. Redirects are never followed, so a credential only goes to url.
More...
#include <http.hpp>
|
| void | add_header (std::string name, std::string value) |
| | Adds a header.
|
| |
| void | add_secret_header (std::string name, const Secret &secret) |
| | Adds a header whose value is secret, marked sensitive.
|
| |
| std::string | describe () const |
| | The method, URL and headers, with sensitive values redacted, for logs and errors.
|
| |
|
| std::string | method = "POST" |
| |
| std::string | url |
| | An http:// or https:// URL.
|
| |
| std::vector< HttpHeader > | headers |
| |
| std::string | body |
| |
| std::chrono::milliseconds | connect_timeout {10'000} |
| | The longest the connection (and TLS handshake) may take.
|
| |
| std::chrono::milliseconds | read_timeout {600'000} |
| | The longest the server may go without sending a byte. A streamed response can last longer than this in total, as long as it keeps sending.
|
| |
| std::size_t | max_response_bytes = std::size_t{64} << 20 |
| | The most response body bytes to accept, against a server that never stops.
|
| |
An HTTP request. Redirects are never followed, so a credential only goes to url.
◆ add_header()
| void pulsatrix::orch::HttpRequest::add_header |
( |
std::string |
name, |
|
|
std::string |
value |
|
) |
| |
◆ add_secret_header()
| void pulsatrix::orch::HttpRequest::add_secret_header |
( |
std::string |
name, |
|
|
const Secret & |
secret |
|
) |
| |
Adds a header whose value is secret, marked sensitive.
◆ describe()
| std::string pulsatrix::orch::HttpRequest::describe |
( |
| ) |
const |
The method, URL and headers, with sensitive values redacted, for logs and errors.
◆ body
| std::string pulsatrix::orch::HttpRequest::body |
◆ connect_timeout
| std::chrono::milliseconds pulsatrix::orch::HttpRequest::connect_timeout {10'000} |
The longest the connection (and TLS handshake) may take.
◆ headers
| std::vector<HttpHeader> pulsatrix::orch::HttpRequest::headers |
◆ max_response_bytes
| std::size_t pulsatrix::orch::HttpRequest::max_response_bytes = std::size_t{64} << 20 |
The most response body bytes to accept, against a server that never stops.
◆ method
| std::string pulsatrix::orch::HttpRequest::method = "POST" |
◆ read_timeout
| std::chrono::milliseconds pulsatrix::orch::HttpRequest::read_timeout {600'000} |
The longest the server may go without sending a byte. A streamed response can last longer than this in total, as long as it keeps sending.
◆ url
| std::string pulsatrix::orch::HttpRequest::url |
The documentation for this struct was generated from the following file: