2020-01-18 09:38:21 +01:00
|
|
|
/*
|
2021-04-28 22:46:44 +02:00
|
|
|
* Copyright (c) 2018-2020, the SerenityOS developers.
|
2020-01-18 09:38:21 +01:00
|
|
|
*
|
2021-04-22 01:24:48 -07:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-01-18 09:38:21 +01:00
|
|
|
*/
|
|
|
|
|
2020-04-21 01:55:25 +04:30
|
|
|
#pragma once
|
2019-04-10 22:28:10 +02:00
|
|
|
|
2021-01-14 10:07:10 -07:00
|
|
|
#include <AK/ByteBuffer.h>
|
|
|
|
#include <AK/HashMap.h>
|
|
|
|
#include <AK/OwnPtr.h>
|
|
|
|
#include <AK/String.h>
|
|
|
|
#include <AK/URL.h>
|
|
|
|
#include <LibHTTP/HttpsJob.h>
|
2021-04-23 22:45:52 +02:00
|
|
|
#include <RequestServer/ClientConnection.h>
|
|
|
|
#include <RequestServer/HttpsRequest.h>
|
|
|
|
#include <RequestServer/Protocol.h>
|
|
|
|
#include <RequestServer/Request.h>
|
2020-02-02 12:34:39 +01:00
|
|
|
|
2021-04-23 22:45:52 +02:00
|
|
|
namespace RequestServer {
|
2020-05-17 16:33:09 +02:00
|
|
|
|
2020-04-21 01:55:25 +04:30
|
|
|
class HttpsProtocol final : public Protocol {
|
|
|
|
public:
|
2021-01-14 10:07:10 -07:00
|
|
|
using JobType = HTTP::HttpsJob;
|
2021-04-23 22:45:52 +02:00
|
|
|
using RequestType = HttpsRequest;
|
2021-01-14 10:07:10 -07:00
|
|
|
|
2020-04-21 01:55:25 +04:30
|
|
|
HttpsProtocol();
|
2021-01-14 10:07:10 -07:00
|
|
|
~HttpsProtocol() override = default;
|
2019-04-10 22:28:10 +02:00
|
|
|
|
2021-04-23 22:45:52 +02:00
|
|
|
virtual OwnPtr<Request> start_request(ClientConnection&, const String& method, const URL&, const HashMap<String, String>& headers, ReadonlyBytes body) override;
|
2020-04-21 01:55:25 +04:30
|
|
|
};
|
2020-05-17 16:33:09 +02:00
|
|
|
|
|
|
|
}
|