#include <httpserver.h>
Definition at line 150 of file httpserver.h.
◆ HTTPRequest() [1/2]
| http_bitcoin::HTTPRequest::HTTPRequest |
( |
std::shared_ptr< HTTPRemoteClient > |
client | ) |
|
|
inlineexplicit |
◆ HTTPRequest() [2/2]
| http_bitcoin::HTTPRequest::HTTPRequest |
( |
| ) |
|
|
inlineexplicit |
Construct with a null client for unit tests.
Definition at line 167 of file httpserver.h.
◆ GetHeader()
| std::pair< bool, std::string > http_bitcoin::HTTPRequest::GetHeader |
( |
std::string_view |
hdr | ) |
const |
◆ GetPeer()
| CService http_bitcoin::HTTPRequest::GetPeer |
( |
| ) |
const |
◆ GetQueryParameter()
| std::optional< std::string > http_bitcoin::HTTPRequest::GetQueryParameter |
( |
std::string_view |
key | ) |
const |
◆ GetRequestMethod()
◆ GetURI()
| std::string http_bitcoin::HTTPRequest::GetURI |
( |
| ) |
const |
|
inline |
◆ LoadBody()
| bool http_bitcoin::HTTPRequest::LoadBody |
( |
LineReader & |
reader | ) |
|
◆ LoadControlData()
| bool http_bitcoin::HTTPRequest::LoadControlData |
( |
LineReader & |
reader | ) |
|
Methods that attempt to parse HTTP request fields line-by-line from a receive buffer.
- Parameters
-
| [in] | reader | A LineReader object constructed over a span of data. |
- Returns
- true If the request field was parsed. false If there was not enough data in the buffer to complete the field.
- Exceptions
-
| std::runtime_error | if data is invalid. |
Definition at line 367 of file httpserver.cpp.
◆ LoadHeaders()
| bool http_bitcoin::HTTPRequest::LoadHeaders |
( |
LineReader & |
reader | ) |
|
◆ ReadBody()
| std::string http_bitcoin::HTTPRequest::ReadBody |
( |
| ) |
const |
|
inline |
◆ WriteHeader()
| void http_bitcoin::HTTPRequest::WriteHeader |
( |
std::string && |
hdr, |
|
|
std::string && |
value |
|
) |
| |
◆ WriteReply() [1/2]
| void http_bitcoin::HTTPRequest::WriteReply |
( |
HTTPStatusCode |
status, |
|
|
std::span< const std::byte > |
reply_body = {} |
|
) |
| |
◆ WriteReply() [2/2]
| void http_bitcoin::HTTPRequest::WriteReply |
( |
HTTPStatusCode |
status, |
|
|
std::string_view |
reply_body_view |
|
) |
| |
|
inline |
◆ m_body
| std::string http_bitcoin::HTTPRequest::m_body |
◆ m_client
Pointer to the client that made the request so we know who to respond to.
Definition at line 160 of file httpserver.h.
◆ m_headers
◆ m_method
◆ m_response_headers
| HTTPHeaders http_bitcoin::HTTPRequest::m_response_headers |
Response headers may be set in advance before response body is known.
Definition at line 163 of file httpserver.h.
◆ m_target
| std::string http_bitcoin::HTTPRequest::m_target |
◆ m_version
The documentation for this class was generated from the following files: