A lightweight C++ wrapper around libcurl for making HTTP/REST requests with both simple and advanced configuration options.
restclient-cpp is a C++ library that provides a simple and efficient interface for making HTTP and REST API requests. It wraps the libcurl library to handle network communication, offering both easy-to-use static methods for basic calls and configurable connection objects for advanced features like authentication, timeouts, and persistent connections. It solves the problem of integrating web services into C++ applications without dealing with libcurl's verbose low-level API.
C++ developers who need to interact with HTTP-based web services or REST APIs in their applications, ranging from simple scripts to complex systems requiring fine-grained control over network requests.
Developers choose restclient-cpp because it combines the power of libcurl with a clean, modern C++ API, reducing boilerplate code while supporting advanced features like connection reuse, progress tracking, and custom callbacks. Its dual simple/advanced usage patterns cater to both quick prototyping and production-grade needs.
C++ client for making HTTP/REST requests
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Provides static methods like get() and post() for quick one-off requests, reducing boilerplate code compared to raw libcurl.
Supports persistent connections, timeouts, authentication, and custom headers via Connection objects, enabling efficient API communication with reuse.
Returns HTTP status codes or libcurl error codes in a unified Response struct, with fallbacks like GetInfo() for detailed error inspection.
Allows custom progress and write callbacks for streaming data, as shown in examples for APIs like Kubernetes Watch.
Includes HTTPS, proxy tunneling, and Unix socket connections, catering to diverse networking needs such as Docker API integration.
The simple static API implicitly calls curl global functions and is not thread-safe, requiring careful handling in multi-threaded applications.
Inherits libcurl's bugs and limitations, such as issues with gnutls compilation noted in the README, adding potential integration headaches.
Configuring advanced features like progress callbacks requires using libcurl's C-style function pointers, which can feel cumbersome in modern C++.
While it wraps libcurl, developers still need to understand low-level curl options for fine-tuning, missing a more intuitive C++-friendly layer.