GithubHelp home page GithubHelp logo

tankerhq / fetchpp Goto Github PK

View Code? Open in Web Editor NEW
2.0 5.0 1.0 533 KB

A C++17 HTTP asynchronous client

Home Page: https://tanker.io

License: Apache License 2.0

CMake 3.84% Python 2.32% C++ 93.78% Shell 0.07%
http boost beast async

fetchpp's Introduction

Tanker logo

License Last Commit

A C++17 asynchronous HTTP client

Overview · Contributing · License

Overview

Fetchpp is a C++17 asynchronous HTTP client written on top of Boost Beast and ASIO.

It closely follows ASIO API recommendations and style. This allows Fetchpp API to be used with callbacks, std::future, coroutines and more.

Quickstart

#include <fetchpp/get.hpp>

#include <iostream>

int main()
{
  boost::asio::io_context ioc;

  fetchpp::async_get(ioc.get_executor(),
                     "http://httpbin.org/get",
                     [](auto err, auto response) {
                       if (err)
                         std::cerr << err.message() << std::endl;
                       std::cout << response.result_int() << std::endl;
                     });
  ioc.run();
  return 0;
}

Contributing

We welcome feedback. Feel free to open any issue on the Github bug tracker.

License

Fetchpp is licensed under the Apache License, version 2.0.

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.