mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 15:16:14 +00:00
ProtocolServer+LibWeb: Support more detailed HTTP requests
This patch adds the ability for ProtocolServer clients to specify which HTTP method to use, and also to include an optional HTTP request body.
This commit is contained in:
@@ -79,6 +79,10 @@ ByteBuffer HttpRequest::to_raw_request() const
|
||||
builder.append("\r\n");
|
||||
}
|
||||
builder.append("Connection: close\r\n\r\n");
|
||||
if (!m_body.is_empty()) {
|
||||
builder.append((const char*)m_body.data(), m_body.size());
|
||||
builder.append("\r\n");
|
||||
}
|
||||
return builder.to_byte_buffer();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user