kalshi-cpp 0.6.2
C++23 client for Kalshi's Predictions API
Loading...
Searching...
No Matches
kalshi::HttpTransport Class Referenceabstract

Request boundary used by KalshiClient. More...

#include <kalshi/http_client.hpp>

Inheritance diagram for kalshi::HttpTransport:
kalshi::HttpClient kalshi::RateLimitedTransport kalshi::RetryingTransport

Public Member Functions

virtual ~HttpTransport ()=default
 
virtual Result< HttpResponse > request (HttpMethod method, std::string_view path, std::string_view body={}) const =0
 path is relative to the base URL and may carry a query string.
 
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
 

Detailed Description

Request boundary used by KalshiClient.

Implement it to add logging, retries, or rate limiting, or to test without a network.

Constructor & Destructor Documentation

◆ ~HttpTransport()

virtual kalshi::HttpTransport::~HttpTransport ( )
virtualdefault

Member Function Documentation

◆ request()

virtual Result< HttpResponse > kalshi::HttpTransport::request ( HttpMethod  method,
std::string_view  path,
std::string_view  body = {} 
) const
pure virtual

path is relative to the base URL and may carry a query string.

Implemented in kalshi::HttpClient, kalshi::RateLimitedTransport, and kalshi::RetryingTransport.

◆ get()

Result< HttpResponse > kalshi::HttpTransport::get ( std::string_view  path) const
inline

◆ post()

Result< HttpResponse > kalshi::HttpTransport::post ( std::string_view  path,
std::string_view  body = {} 
) const
inline

◆ put()

Result< HttpResponse > kalshi::HttpTransport::put ( std::string_view  path,
std::string_view  body = {} 
) const
inline

◆ del()

Result< HttpResponse > kalshi::HttpTransport::del ( std::string_view  path,
std::string_view  body = {} 
) const
inline

The documentation for this class was generated from the following file: