Nfhttp: A cross platform C++ HTTP library natively interfacing to platforms
In order to carry this forward in the cross-platform C++ world, we created this library that provides a common interface to many of the system level HTTP interfaces, and predictable caching and request hooking. , simply add the following line to your file:
Generate an Xcode project from the Cmake project like so:
Generate a Ninja project from the Cmake project like so:
Generate a Visual Studio project from the Cmake project like so:
In order to execute HTTP requests, you must first create a client like so:
It is wise to only create one client per application instance, in reality you will only need one (unless you need to separate the caching mechanism for your own reasons). Because we are now part of the layered architecture, we can perform any changes we want on the requests or responses, such as decorating with OAuth tokens, redirecting to other URLs, retrying responses or even cancelling responses altogether.
Source: github.com