SiddiqSoft.restcl
2.0.2
See the version list below for details.
dotnet add package SiddiqSoft.restcl --version 2.0.2
NuGet\Install-Package SiddiqSoft.restcl -Version 2.0.2
<PackageReference Include="SiddiqSoft.restcl" Version="2.0.2" />
<PackageVersion Include="SiddiqSoft.restcl" Version="2.0.2" />
<PackageReference Include="SiddiqSoft.restcl" />
paket add SiddiqSoft.restcl --version 2.0.2
#r "nuget: SiddiqSoft.restcl, 2.0.2"
#:package SiddiqSoft.restcl@2.0.2
#addin nuget:?package=SiddiqSoft.restcl&version=2.0.2
#tool nuget:?package=SiddiqSoft.restcl&version=2.0.2
restcl : A focused REST Client for Modern C++
Overview
restcl is a header-only REST client library for modern C++23 that provides a clean, JSON-first API for interacting with RESTful servers. It abstracts platform-specific HTTP implementations (WinHTTP on Windows, libcurl on Unix/Linux/macOS) behind a unified, modern C++ interface. The library prioritizes simplicity and clarity over performance, making it ideal for applications that need straightforward REST communication without the complexity of lower-level HTTP libraries.
Key Features
- JSON-First API: JSON is a first-class citizen in the API design
- Modern C++23: Leverages C++23 features including
std::expected,std::format, and user-defined literals - Header-Only: Easy integration with no compilation overhead
- Cross-Platform: Native implementations for Windows (WinHTTP) and Unix/Linux/macOS (libcurl)
- User-Defined Literals: Convenient syntax like
"https://api.example.com"_GET - Async Support: Non-blocking async operations with callback-based responses
- Error Handling: Uses
std::expected<T, E>for robust error handling without exceptions - Comprehensive Testing: Extensive test suite with unit, integration, and stress tests
Motivation
Design a library where JSON is a first-class API metaphor for interacting with RESTful servers.
- Focused on REST interactions with JSON. Limiting allows us to simplify the usage and make it feel very C++ instead of the C-like API of Win32 or LibCURL.
- Modern C++ features: C++23 is required!
- Visual Studio 2022
- Windows version uses WinHTTP library and HTTP/2
- Header only
- Use native implementations for the actual IO: Windows support uses WinHttp library.
- Initial implementation is for Windows using WinHTTP.
- Alternate implementation using LibCURL.
- Support for literals to allow
_GET,_DELETE, etc. Using thesiddiqsoft::restcl_literalsnamespace. - Support for std::format and concepts.
- Be instructional and use as little code as necessary.
- The focus is on the interface to the end user.
- Performance is not the objective.
- Simplicity (hide the underlying implementation)
Documentation
For comprehensive guidance on code style, testing strategies, common patterns, and best practices when working with or extending this library, see best_practices.md.
Roadmap
- Optimize
- Add more tests
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| native | native is compatible. |
-
- nlohmann.json (>= 3.11.0)
- SiddiqSoft.acw32h (>= 2.7.0)
- SiddiqSoft.asynchrony (>= 1.8.0)
- SiddiqSoft.AzureCppUtils (>= 3.0.1)
- SiddiqSoft.SplitUri (>= 2.1.0)
- SiddiqSoft.string2map (>= 2.4.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on SiddiqSoft.restcl:
| Package | Downloads |
|---|---|
|
SiddiqSoft.CosmosClient
Azure Cosmos REST-API Client for Modern C++ |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.3.4 | 35 | 5/19/2026 |
| 2.3.3 | 66 | 5/18/2026 |
| 2.3.2 | 68 | 5/18/2026 |
| 2.3.1 | 67 | 5/18/2026 |
| 2.2.1 | 74 | 5/16/2026 |
| 2.1.0 | 115 | 5/1/2026 |
| 2.0.3 | 151 | 4/29/2026 |
| 2.0.2 | 114 | 4/28/2026 |
| 1.6.5 | 509 | 12/17/2024 |
| 1.6.4 | 456 | 12/13/2024 |
| 1.6.3 | 474 | 12/12/2024 |
| 1.6.2 | 435 | 12/7/2024 |
| 1.6.1 | 427 | 12/7/2024 |
| 1.6.0 | 413 | 12/7/2024 |
| 1.5.2.4 | 453 | 10/28/2024 |
| 1.5.2 | 443 | 10/25/2024 |
| 1.5.1 | 456 | 10/4/2024 |
| 0.10.13 | 410 | 10/2/2024 |
| 0.10.12 | 443 | 10/2/2024 |
| 0.10.11 | 434 | 10/2/2024 |
Documentation at https://siddiqsoft.github.io/restcl