#pragma once #include #include #include class CHttpResponse : public CNetworkResponse { public: virtual ~CHttpResponse() override; static NonnullRefPtr create(int code, HashMap&& headers, ByteBuffer&& payload) { return adopt(*new CHttpResponse(code, move(headers), move(payload))); } int code() const { return m_code; } const HashMap& headers() const { return m_headers; } private: CHttpResponse(int code, HashMap&&, ByteBuffer&&); int m_code { 0 }; HashMap m_headers; };