mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-09-13 14:13:52 +02:00
refactor: Make HTTPRequest::GetHeader() return saner optional type
No need to stick to weird old API from libevent-wrapper days. Makes later commits in the PR cleaner.
This commit is contained in:
@@ -192,7 +192,7 @@ public:
|
||||
CService GetPeer() const;
|
||||
HTTPRequestMethod GetRequestMethod() const { return m_method; }
|
||||
std::optional<std::string> GetQueryParameter(std::string_view key) const;
|
||||
std::pair<bool, std::string> GetHeader(std::string_view hdr) const;
|
||||
std::optional<std::string> GetHeader(std::string_view hdr) const;
|
||||
std::string ReadBody() const { return m_body; }
|
||||
void WriteHeader(std::string&& hdr, std::string&& value);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user