mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:37:35 +00:00
LibHTTP: Make HTTPRequest::from_raw_request() take a ReadonlyBytes
This allows us to get rid of some ByteBuffer::wrap() usage.
This commit is contained in:
parent
e517505e35
commit
48d74c5356
5 changed files with 6 additions and 6 deletions
|
@ -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,
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue