Skip to content

eth::rpc::RpcHttpTransport

#include <rpc_http_transport.hpp>

Inherits from eth::rpc::JsonRpcTransport

Public Functions

Name
RpcHttpTransport(std::string endpoint_url, RpcHttpTransportOptions options ={})
virtual std::optional< std::string > call(const boost::json::object & request) override
std::string_view endpoint_url() const
std::optional< std::string > HttpsGet(const std::string & url, const RpcHttpTransportOptions & options ={})
Perform a one-shot HTTPS GET and return the response body.

Additional inherited members

Public Functions inherited from eth::rpc::JsonRpcTransport

Name
virtual ~JsonRpcTransport() =default

Public Functions Documentation

function RpcHttpTransport

explicit RpcHttpTransport(
    std::string endpoint_url,
    RpcHttpTransportOptions options ={}
)

function call

virtual std::optional< std::string > call(
    const boost::json::object & request
) override

Reimplements: eth::rpc::JsonRpcTransport::call

function endpoint_url

inline std::string_view endpoint_url() const

function HttpsGet

static std::optional< std::string > HttpsGet(
    const std::string & url,
    const RpcHttpTransportOptions & options ={}
)

Perform a one-shot HTTPS GET and return the response body.

Parameters:

  • url Fully-qualified https:// URL (host[:port]/target).
  • options Transport options (timeout, TLS verify).

Return: Response body on HTTP 2xx, or std::nullopt on any failure.


Updated on 2026-08-14 at 19:28:58 +0000