1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 12:57:35 +00:00

RequestServer+LibProtocol: Allow users to specify a per-request proxy

This commit is contained in:
Ali Mohammad Pur 2022-04-07 21:10:33 +04:30 committed by Andreas Kling
parent cd9d740107
commit 45867435c4
16 changed files with 52 additions and 24 deletions

View file

@ -8,6 +8,7 @@
#include <AK/RefPtr.h>
#include <AK/URL.h>
#include <LibCore/Proxy.h>
#include <RequestServer/Forward.h>
namespace RequestServer {
@ -17,7 +18,7 @@ public:
virtual ~Protocol();
String const& name() const { return m_name; }
virtual OwnPtr<Request> start_request(ConnectionFromClient&, String const& method, const URL&, HashMap<String, String> const& headers, ReadonlyBytes body) = 0;
virtual OwnPtr<Request> start_request(ConnectionFromClient&, String const& method, const URL&, HashMap<String, String> const& headers, ReadonlyBytes body, Core::ProxyData proxy_data = {}) = 0;
static Protocol* find_by_name(String const&);