early-access version 1799

This commit is contained in:
pineappleEA
2021-06-21 18:57:28 +02:00
parent 6924d51f6d
commit 27b7bc6ca2
58 changed files with 51107 additions and 3 deletions

29
externals/cpp-httplib/example/simplecli.cc vendored Executable file
View File

@@ -0,0 +1,29 @@
//
// simplecli.cc
//
// Copyright (c) 2019 Yuji Hirose. All rights reserved.
// MIT License
//
#include <httplib.h>
#include <iostream>
using namespace std;
int main(void) {
#ifdef CPPHTTPLIB_OPENSSL_SUPPORT
auto scheme_host_port = "https://localhost:8080";
#else
auto scheme_host_port = "http://localhost:8080";
#endif
if (auto res = httplib::Client(scheme_host_port).Get("/hi")) {
cout << res->status << endl;
cout << res->get_header_value("Content-Type") << endl;
cout << res->body << endl;
} else {
cout << res.error() << endl;
}
return 0;
}