#include <httpserver.h>
|
| std::vector< std::pair< std::string, std::string > > | m_headers |
| | Headers can have duplicate field names, so we use a vector of key-value pairs instead of a map. More...
|
| |
Definition at line 88 of file httpserver.h.
◆ FindAll()
| std::vector< std::string_view > http_bitcoin::HTTPHeaders::FindAll |
( |
std::string_view |
key | ) |
const |
- Parameters
-
| [in] | key | The field-name of the header to search for |
- Returns
- Views into all values matching the provided key (valid while this object is alive)
Definition at line 276 of file httpserver.cpp.
◆ FindFirst()
| std::optional< std::string > http_bitcoin::HTTPHeaders::FindFirst |
( |
std::string_view |
key | ) |
const |
- Parameters
-
| [in] | key | The field-name of the header to search for |
- Returns
- The value of the first header that matches the provided key nullopt if key is not found
Definition at line 266 of file httpserver.cpp.
◆ Read()
- Returns
- false if LineReader hits the end of the buffer before reading an
, meaning that we are still waiting on more data from the client. true after reading an entire HTTP headers section, terminated by an empty line and
.
- Exceptions
-
| on | exceeded read limit and on bad headers syntax (e.g. no ":" in a line) |
Definition at line 300 of file httpserver.cpp.
◆ RemoveAll()
| void http_bitcoin::HTTPHeaders::RemoveAll |
( |
std::string_view |
key | ) |
|
- Parameters
-
| [in] | key | The field-name of the header to search for and delete |
Definition at line 292 of file httpserver.cpp.
◆ Stringify()
| std::string http_bitcoin::HTTPHeaders::Stringify |
( |
| ) |
const |
◆ Write()
| void http_bitcoin::HTTPHeaders::Write |
( |
std::string && |
key, |
|
|
std::string && |
value |
|
) |
| |
◆ m_headers
| std::vector<std::pair<std::string, std::string> > http_bitcoin::HTTPHeaders::m_headers |
|
private |
The documentation for this class was generated from the following files: