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:
Andreas Kling 2020-09-28 11:55:26 +02:00
commit 2946a684ef
Notes: sideshowbarker 2024-07-19 02:09:01 +09:00
21 changed files with 78 additions and 26 deletions

View file

@ -44,7 +44,7 @@ public:
virtual void handshake() override;
bool is_supported_protocol(const String&);
RefPtr<Download> start_download(const String& url, const HashMap<String, String>& request_headers = {});
RefPtr<Download> start_download(const String& method, const String& url, const HashMap<String, String>& request_headers = {}, const ByteBuffer& request_body = {});
bool stop_download(Badge<Download>, Download&);
bool set_certificate(Badge<Download>, Download&, String, String);