|
kalshi-cpp 0.6.2
C++23 client for Kalshi's Predictions API
|
Transport decorator that retries transient failures with exponential backoff. More...
#include <kalshi/retry.hpp>
Public Member Functions | |
| RetryingTransport (std::shared_ptr< const HttpTransport > inner, RetryPolicy policy={}) | |
| Result< HttpResponse > | request (HttpMethod method, std::string_view path, std::string_view body={}) const override |
path is relative to the base URL and may carry a query string. | |
| const RetryPolicy & | policy () const noexcept |
Public Member Functions inherited from kalshi::HttpTransport | |
| virtual | ~HttpTransport ()=default |
| Result< HttpResponse > | get (std::string_view path) const |
| Result< HttpResponse > | post (std::string_view path, std::string_view body={}) const |
| Result< HttpResponse > | put (std::string_view path, std::string_view body={}) const |
| Result< HttpResponse > | del (std::string_view path, std::string_view body={}) const |
Transport decorator that retries transient failures with exponential backoff.
A Retry-After header lengthens the wait, up to max_delay.
auto http = std::make_shared<kalshi::HttpClient>(signer);
kalshi::KalshiClient client{std::make_shared<kalshi::RetryingTransport>(http)};
|
explicit |
|
overridevirtual |
path is relative to the base URL and may carry a query string.
Implements kalshi::HttpTransport.
|
inlinenoexcept |