Skip to content

C++20 / Boost HTTP client library with connection pool

License

Notifications You must be signed in to change notification settings

Ri0n/rhhpl

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

An easy to use C++ Boost-based HTTP library with connection pool inside

Yes you read this right, Boost finally got internal wget/curl (almost)!

But better read an article from Boost.Beast maintainer - Richard Hodges. Basically this repository just packs his code into a library.

Requirements

  • Boost 1.75
  • OpenSSL

Build

Regular cmake build:

mkdir build; cd build; cmake .. && cmake --build . -j 8

If you need just library and no demo tools pass -DBUILD_TOOLS=OFF to cmake.

Install

cmake --install . # from the build directory

It will install static library and tools.

Usage

http::connection_cache cache(co_await net::this_coro::executor);
auto result = co_await cache.call(http::verb::get, "https://yourwebhost.com");
std::cout << result->body();
// don't forget to catch exceptions

Releases

No releases published

Packages

No packages published

Languages

  • C++ 98.8%
  • CMake 1.2%