Pistache
Pistache is a C++ REST framework written by Mathieu Stefani at Datacratic
that provides an http and REST server, as well as an http client.
Pistache provides a clear and asynchronous API, with no external dependency.
#include "pistache/client.h"
using namespace Net::Http;
int main() {
auto options =
Client::options().threads(1).maxConnections(10);
Client client("http://my-api.com");
auto resp = client.get("/ping").cookie(Cookie("USER", "me")).send();
resp.then([](Response response) {
// Handle response
}, Async::NoExcept);
std::this_thread::sleep_for(std::chrono::seconds(1));
}