Skip to content
This repository has been archived by the owner on Jul 28, 2022. It is now read-only.
/ fetchpp Public archive

A C++17 HTTP asynchronous client

License

Notifications You must be signed in to change notification settings

TankerHQ/fetchpp

Repository files navigation

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.