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:
Hodlinator
2026-08-17 22:25:40 +02:00
parent e5be0dc35e
commit b8cd77237b
5 changed files with 19 additions and 20 deletions

View File

@@ -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);