|
NeoGraph 0.16.0
A C++20 Graph Agent Engine Library — LangGraph for C++
|
Per-call knobs. More...
#include <http_client.h>
Public Attributes | |
| bool | allow_replay = false |
| For ConnPool, permit one replay after a stale keep-alive connection fails. | |
| std::chrono::milliseconds | connect_timeout {0} |
| Deadline for establishing the connection only: name resolution, the TCP connect and, for HTTPS, the TLS handshake. | |
| int | max_redirects = 0 |
| Max 3xx hops to follow automatically. | |
| std::size_t | max_response_body_bytes = 16 * 1024 * 1024 |
| Maximum decoded response body bytes accepted per hop. | |
| std::size_t | max_response_chunk_bytes = 1024 * 1024 |
| Maximum bytes accepted in one HTTP transfer chunk (or one Curl body callback). | |
| std::size_t | max_response_header_bytes = 64 * 1024 |
| Maximum bytes accepted for a response status/header block, trailer block, or individual chunk-size line. | |
| std::chrono::milliseconds | timeout {0} |
| Per-hop deadline covering connect + handshake + write + read of one HTTP exchange. | |
Per-call knobs.
Default construction keeps timeout and redirect-following disabled while applying conservative inbound response limits.
Definition at line 67 of file http_client.h.
| bool neograph::async::RequestOptions::allow_replay = false |
For ConnPool, permit one replay after a stale keep-alive connection fails.
The one-shot clients never replay a request. Disabled by default because a transport error cannot prove that a non-idempotent request did not already reach the server. Safe methods may still be retried by the pool without this opt-in.
Definition at line 92 of file http_client.h.
| std::chrono::milliseconds neograph::async::RequestOptions::connect_timeout {0} |
Deadline for establishing the connection only: name resolution, the TCP connect and, for HTTPS, the TLS handshake.
Zero = none (the default). It stops counting once the request can be written, so a response or an event stream that takes long is not affected by it; timeout is the bound for the whole exchange and, when both are set, whichever expires first ends the call. Expiry throws asio::system_error(asio::error::timed_out). A name lookup that is already running cannot be interrupted (the system resolver cannot be cancelled), so the deadline is then noticed when the lookup returns. Honoured by async_post, async_get, async_post_stream and async_request_stream; ConnPool and CurlH2Pool do not read it.
Definition at line 85 of file http_client.h.
| int neograph::async::RequestOptions::max_redirects = 0 |
Max 3xx hops to follow automatically.
Zero (default) = never follow; the 3xx response comes straight back to the caller with location populated. Redirects preserve the POST method and body for all 3xx codes (pragmatic for the LLM/MCP hosts we target — no 303 → GET downgrade).
Definition at line 99 of file http_client.h.
| std::size_t neograph::async::RequestOptions::max_response_body_bytes = 16 * 1024 * 1024 |
Maximum decoded response body bytes accepted per hop.
Checked before allocating or appending body storage. Zero disables this limit.
Definition at line 108 of file http_client.h.
| std::size_t neograph::async::RequestOptions::max_response_chunk_bytes = 1024 * 1024 |
Maximum bytes accepted in one HTTP transfer chunk (or one Curl body callback).
Zero disables this limit.
Definition at line 112 of file http_client.h.
| std::size_t neograph::async::RequestOptions::max_response_header_bytes = 64 * 1024 |
Maximum bytes accepted for a response status/header block, trailer block, or individual chunk-size line.
Zero disables this limit.
Definition at line 103 of file http_client.h.
| std::chrono::milliseconds neograph::async::RequestOptions::timeout {0} |
Per-hop deadline covering connect + handshake + write + read of one HTTP exchange.
Zero = no timeout (the default). Applied independently to each hop when following redirects rather than as a total budget.
Definition at line 72 of file http_client.h.