1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 11:47:46 +00:00

Applications: Remove unused/unfinished "Downloader" program

This commit is contained in:
Andreas Kling 2019-11-23 19:26:57 +01:00
parent 8f9a522c37
commit 5d8324f133
4 changed files with 0 additions and 40 deletions

View file

@ -1,8 +0,0 @@
include ../../Makefile.common
OBJS = \
main.o
APP = Downloader
include ../Makefile.common

View file

@ -1,29 +0,0 @@
#include <LibCore/CHttpRequest.h>
#include <LibCore/CHttpResponse.h>
#include <LibCore/CNetworkJob.h>
#include <LibGUI/GApplication.h>
#include <stdio.h>
int main(int argc, char** argv)
{
GApplication app(argc, argv);
CHttpRequest request;
request.set_url("http://www.google.com/");
auto job = request.schedule();
job->on_finish = [&job](bool success) {
if (!success) {
dbgprintf("on_finish: request failed :(\n");
return;
}
auto& response = static_cast<const CHttpResponse&>(*job->response());
printf("%s{%p}: on_receive: code=%d\n", job->class_name(), job.ptr(), response.code());
//printf("payload:\n");
//printf("%s", response.payload().data());
printf("payload was %d bytes\n", response.payload().size());
};
printf("Entering main loop...\n");
return app.exec();
}