1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-18 05:15:06 +00:00

LibCore+LibHTTP: Move out the HTTP handler and add HTTPS

This commit is contained in:
AnotherTest 2020-04-21 01:55:25 +04:30 committed by Andreas Kling
parent 8d20a526e5
commit 7670e5ccf0
27 changed files with 613 additions and 70 deletions

View file

@ -24,8 +24,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <LibCore/HttpJob.h>
#include <LibCore/HttpRequest.h>
#include <LibHTTP/HttpJob.h>
#include <LibHTTP/HttpRequest.h>
#include <ProtocolServer/HttpDownload.h>
#include <ProtocolServer/HttpProtocol.h>
@ -40,11 +40,11 @@ HttpProtocol::~HttpProtocol()
RefPtr<Download> HttpProtocol::start_download(PSClientConnection& client, const URL& url)
{
Core::HttpRequest request;
request.set_method(Core::HttpRequest::Method::GET);
HTTP::HttpRequest request;
request.set_method(HTTP::HttpRequest::Method::GET);
request.set_url(url);
auto job = request.schedule();
if (!job)
return nullptr;
return HttpDownload::create_with_job({}, client, (Core::HttpJob&)*job);
return HttpDownload::create_with_job({}, client, (HTTP::HttpJob&)*job);
}