Serenity Operating System
1/*
2 * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
3 *
4 * SPDX-License-Identifier: BSD-2-Clause
5 */
6
7#include <AK/Badge.h>
8#include <AK/ByteBuffer.h>
9#include <AK/DeprecatedString.h>
10#include <AK/HashMap.h>
11#include <AK/OwnPtr.h>
12#include <AK/URL.h>
13#include <RequestServer/ConnectionFromClient.h>
14#include <RequestServer/HttpCommon.h>
15#include <RequestServer/HttpProtocol.h>
16#include <RequestServer/Request.h>
17
18namespace RequestServer {
19
20HttpProtocol::HttpProtocol()
21 : Protocol("http")
22{
23}
24
25OwnPtr<Request> HttpProtocol::start_request(ConnectionFromClient& client, DeprecatedString const& method, const URL& url, HashMap<DeprecatedString, DeprecatedString> const& headers, ReadonlyBytes body, Core::ProxyData proxy_data)
26{
27 return Detail::start_request(Badge<HttpProtocol> {}, client, method, url, headers, body, get_pipe_for_request(), proxy_data);
28}
29
30}