Simple synchronous HTTP client using Sock class.
More...
|
| HTTPResponse | Post (const std::string &endpoint, std::span< const std::pair< std::string, std::string > > headers, const std::string &body) |
| |
|
| static HTTPClient | Connect (const std::string &host, uint16_t port, std::chrono::seconds timeout) |
| |
|
| | HTTPClient (std::unique_ptr< Sock > &&socket, const std::string &host, std::chrono::seconds timeout) |
| |
| bool | SendRequest (std::string_view request) |
| |
| HTTPResponse | ReadResponse () |
| |
| std::optional< std::string > | Recv (std::chrono::time_point< std::chrono::steady_clock > deadline) |
| |
Simple synchronous HTTP client using Sock class.
Definition at line 836 of file bitcoin-cli.cpp.
◆ HTTPClient()
| HTTPClient::HTTPClient |
( |
std::unique_ptr< Sock > && |
socket, |
|
|
const std::string & |
host, |
|
|
std::chrono::seconds |
timeout |
|
) |
| |
|
inlineprivate |
◆ Connect()
| HTTPClient HTTPClient::Connect |
( |
const std::string & |
host, |
|
|
uint16_t |
port, |
|
|
std::chrono::seconds |
timeout |
|
) |
| |
|
static |
◆ Post()
| HTTPResponse HTTPClient::Post |
( |
const std::string & |
endpoint, |
|
|
std::span< const std::pair< std::string, std::string > > |
headers, |
|
|
const std::string & |
body |
|
) |
| |
◆ ReadResponse()
◆ Recv()
| std::optional< std::string > HTTPClient::Recv |
( |
std::chrono::time_point< std::chrono::steady_clock > |
deadline | ) |
|
|
private |
◆ SendRequest()
| bool HTTPClient::SendRequest |
( |
std::string_view |
request | ) |
|
|
private |
◆ m_host
| std::string HTTPClient::m_host |
|
private |
◆ m_socket
| std::unique_ptr<Sock> HTTPClient::m_socket |
|
private |
◆ m_timeout
| std::chrono::seconds HTTPClient::m_timeout |
|
private |
The documentation for this class was generated from the following file: