#define CPPHTTPLIB_OPENSSL_SUPPORT #include "path/to/httplib.h" // HTTP httplib::Client cli("http://yhirose.github.io"); // HTTPS httplib::Client cli("https://yhirose.github.io"); auto res = cli.Get("/hi"); res-
cpp-httplib A C++ single-file header-only cross platform HTTP/HTTPS library. It's extremely easy to setup. Just includehttplib.hfile in your code! Server Example #include<httplib.h>intmain(void) {usingnamespacehttplib;Server svr; svr.Get("/hi", [](constRequest& req, Response& res) { ...
httplib::Clientcli("http://cpp-httplib-server.yhirose.repl.co");autores = cli.Get("/hi"); res->status;//200res->body;//"Hello World!" Try out the examples on Repl.it! Server #include<httplib.h>intmain(void) {usingnamespacehttplib;Server svr; svr.Get("/hi", [](constRequest&...
cpp-httplib A C++ single-file header-only cross platform HTTP/HTTPS library. It's extremely easy to setup. Just includehttplib.hfile in your code! Server Example #include<httplib.h>intmain(void) {usingnamespacehttplib;Server svr; svr.Get("/hi", [](constRequest& req, Response& res) { ...
#define CPPHTTPLIB_OPENSSL_SUPPORT #include "path/to/httplib.h" // HTTP httplib::Client cli("http://yhirose.github.io"); // HTTPS httplib::Client cli("https://yhirose.github.io"); auto res = cli.Get("/hi"); res->status; res->body;...
Please see https://github.com/google/brotli for more detail.Compress request body on clientcli.set_compress(true); res = cli.Post("/resource/foo", "...", "text/plain");Compress response body on clientcli.set_decompress(false); res = cli.Get(...
Brotli compression is available withCPPHTTPLIB_BROTLI_SUPPORT. Necessary libraries should be linked. Please seehttps://github.com/google/brotlifor more detail. cli.set_decompress(false); res = cli.Get("/resource/foo", {{"Accept-Encoding","gzip, deflate, br"}}); res->body;//Compressed data...
.github/workflows benchmark cmake docker example test .clang-format .gitattributes .gitignore CMakeLists.txt Dockerfile LICENSE README.md docker-compose.yml httplib.h meson.build meson_options.txt split.py Repository files navigation README License cpp-httplibA C++11 sin...
Please see https://github.com/google/brotli for more detail.Compress request body on clientcli.set_compress(true); res = cli.Post("/resource/foo", "...", "text/plain");Compress response body on clientcli.set_decompress(false); res = cli.Get(...
History1,422 Commits .github/workflows benchmark cmake docker example test .clang-format .gitattributes .gitignore CMakeLists.txt Dockerfile LICENSE README.md docker-compose.yml httplib.h meson.build meson_options.txt split.py ...