Fixed runtime options for the HTTP client.
More...
#include <include/utils.hpp>
|
| int | timeout_ms = 10000 |
| | Total request timeout (ms).
|
| int | connect_ms = 3000 |
| | Connect timeout (ms).
|
| int | max_retries = 3 |
| | Max retry attempts after the first try.
|
| int | retry_base_ms = 200 |
| | Base for exponential backoff (ms).
|
| long long | retry_max_ms = 3000 |
| | Max per-attempt backoff (ms).
|
| std::string | accept = "application/json" |
| | Default Accept header.
|
| std::string | user_agent = "arachne/client" |
| | Default User-Agent.
|
Fixed runtime options for the HTTP client.
Timeouts and retry policy:
- timeout_ms: total operation timeout (libcurl CURLOPT_TIMEOUT_MS).
- connect_ms: connect timeout (libcurl CURLOPT_CONNECTTIMEOUT_MS).
- max_retries: maximum number of retries after the first attempt.
- retry_base_ms: base delay for exponential backoff with jitter.
- retry_max_ms: hard cap for a single backoff sleep.
Headers and identity:
- accept: value for the Accept: request header.
- user_agent: value for the User-Agent: request header.
Definition at line 171 of file utils.hpp.
◆ accept
| std::string corespace::network_options::accept = "application/json" |
Default Accept header.
Definition at line 178 of file utils.hpp.
◆ connect_ms
| int corespace::network_options::connect_ms = 3000 |
Connect timeout (ms).
Definition at line 173 of file utils.hpp.
◆ max_retries
| int corespace::network_options::max_retries = 3 |
Max retry attempts after the first try.
Definition at line 174 of file utils.hpp.
◆ retry_base_ms
| int corespace::network_options::retry_base_ms = 200 |
Base for exponential backoff (ms).
Definition at line 175 of file utils.hpp.
◆ retry_max_ms
| long long corespace::network_options::retry_max_ms = 3000 |
Max per-attempt backoff (ms).
Definition at line 176 of file utils.hpp.
◆ timeout_ms
| int corespace::network_options::timeout_ms = 10000 |
Total request timeout (ms).
Definition at line 172 of file utils.hpp.
◆ user_agent
| std::string corespace::network_options::user_agent = "arachne/client" |
Default User-Agent.
Definition at line 179 of file utils.hpp.
The documentation for this struct was generated from the following file: