/* * Copyright (c) 2018-2020, Andreas Kling * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include namespace HTTP { class HttpResponse : public Core::NetworkResponse { public: virtual ~HttpResponse() override; static NonnullRefPtr create(int code, HashMap&& headers) { return adopt_ref(*new HttpResponse(code, move(headers))); } int code() const { return m_code; } const HashMap& headers() const { return m_headers; } private: HttpResponse(int code, HashMap&&); int m_code { 0 }; HashMap m_headers; }; }