Code Monkey home page Code Monkey logo

http-cpp's Introduction

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

http-cpp's People

Contributors

adsyust avatar blechhirn avatar coldorange avatar henrikbuchholz avatar huangjoh avatar kosta-github avatar larsxschneider avatar ronniexue avatar sebastianvoigt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

http-cpp's Issues

Implement TIMEOUT support

A timeout can already be simulated with the 'std::future::wait_for()' method on the request object but a more direct implementation via a config setting on the 'client' object makes sense as well.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.