1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 06:17:34 +00:00

GHttp: Work on bringing this up.

This commit is contained in:
Andreas Kling 2019-04-07 19:35:07 +02:00
parent 8f30657390
commit 51b4d3fe5a
9 changed files with 93 additions and 16 deletions

View file

@ -7,16 +7,16 @@
class GHttpResponse : public GNetworkResponse {
public:
virtual ~GHttpResponse() override;
static Retained<GHttpResponse> create(int code, ByteBuffer&& payload)
static Retained<GHttpResponse> create(int code, HashMap<String, String>&& headers, ByteBuffer&& payload)
{
return adopt(*new GHttpResponse(code, move(payload)));
return adopt(*new GHttpResponse(code, move(headers), move(payload)));
}
int code() const { return m_code; }
const HashMap<String, String>& headers() const { return m_headers; }
private:
GHttpResponse(int code, ByteBuffer&&);
GHttpResponse(int code, HashMap<String, String>&&, ByteBuffer&&);
int m_code { 0 };
HashMap<String, String> m_headers;