/* * Copyright (c) 2018-2020, Andreas Kling * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include #include #include namespace RequestServer { class HttpRequest final : public Request { public: virtual ~HttpRequest() override; static NonnullOwnPtr create_with_job(Badge&&, ConnectionFromClient&, NonnullRefPtr, NonnullOwnPtr&&); HTTP::Job& job() { return m_job; } HTTP::Job const& job() const { return m_job; } virtual URL url() const override { return m_job->url(); } private: explicit HttpRequest(ConnectionFromClient&, NonnullRefPtr, NonnullOwnPtr&&); NonnullRefPtr m_job; }; }