Skip to content

Provide a simple and portable interface to do HTTP requests in C++.

License

Notifications You must be signed in to change notification settings

Kosta-Github/http-cpp

Repository files navigation

http-cpp Build Status Travis Coverity Scan Build status AppVeyor

Provide a very simple, thread-safe, and portable interface to do async HTTP requests in C++11.

sample

auto client = http::client();
auto reply = client.request("http://www.google.com").data(); // async request
// do some more work in the meantime
const std::string& body = reply.get().body; // retrieve the reply body

OAuth1 sample

auto client = http::oauth1::client();
client.consumer_key    = "...";
client.consumer_secret = "...";
client.token_key       = "...";
client.token_secret    = "...";
auto reply = client.request("https://do.an.oauth1.request.com").data(); // async request
// do some more work in the meantime
const std::string& body = reply.get().body; // retrieve the reply body

external dependencies

  • curl: currently using version 7.41.0 for Windows builds
  • HMAC_SHA1: HMAC_SHA1 library for OAuth1 support
  • base64: Base64 library for OAuth1 support
  • cmake: for the build system
  • cute: only for unit tests
  • node.js: only for unit tests

About

Provide a simple and portable interface to do HTTP requests in C++.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published