diff options
author | Andreas Kling <kling@serenityos.org> | 2020-12-19 17:38:33 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-12-19 18:29:13 +0100 |
commit | 48d74c53565f6bd87e70430ea5b0bc7e6dedb957 (patch) | |
tree | f144a49e40fdc65f7056dc56417c347628dcb51c /Libraries/LibHTTP | |
parent | e517505e35997d3e707b2332be57c5662b330674 (diff) | |
download | serenity-48d74c53565f6bd87e70430ea5b0bc7e6dedb957.zip |
LibHTTP: Make HTTPRequest::from_raw_request() take a ReadonlyBytes
This allows us to get rid of some ByteBuffer::wrap() usage.
Diffstat (limited to 'Libraries/LibHTTP')
-rw-r--r-- | Libraries/LibHTTP/HttpRequest.cpp | 2 | ||||
-rw-r--r-- | Libraries/LibHTTP/HttpRequest.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Libraries/LibHTTP/HttpRequest.cpp b/Libraries/LibHTTP/HttpRequest.cpp index 0793b13fe2..e5eaeefa97 100644 --- a/Libraries/LibHTTP/HttpRequest.cpp +++ b/Libraries/LibHTTP/HttpRequest.cpp @@ -79,7 +79,7 @@ ByteBuffer HttpRequest::to_raw_request() const return builder.to_byte_buffer(); } -Optional<HttpRequest> HttpRequest::from_raw_request(const ByteBuffer& raw_request) +Optional<HttpRequest> HttpRequest::from_raw_request(ReadonlyBytes raw_request) { enum class State { InMethod, diff --git a/Libraries/LibHTTP/HttpRequest.h b/Libraries/LibHTTP/HttpRequest.h index 7ef91d9968..8c1b158aa8 100644 --- a/Libraries/LibHTTP/HttpRequest.h +++ b/Libraries/LibHTTP/HttpRequest.h @@ -69,7 +69,7 @@ public: void set_headers(const HashMap<String, String>&); - static Optional<HttpRequest> from_raw_request(const ByteBuffer&); + static Optional<HttpRequest> from_raw_request(ReadonlyBytes); private: URL m_url; |