SiddiqSoft.restcl 2.0.2

There is a newer version of this package available.
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
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SiddiqSoft.restcl" Version="2.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SiddiqSoft.restcl" Version="2.0.2" />
                    
Directory.Packages.props
<PackageReference Include="SiddiqSoft.restcl" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add SiddiqSoft.restcl --version 2.0.2
                    
#r "nuget: SiddiqSoft.restcl, 2.0.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package SiddiqSoft.restcl@2.0.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=SiddiqSoft.restcl&version=2.0.2
                    
Install as a Cake Addin
#tool nuget:?package=SiddiqSoft.restcl&version=2.0.2
                    
Install as a Cake Tool

restcl : A focused REST Client for Modern C++

Build Status alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

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 the siddiqsoft::restcl_literals namespace.
  • 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 Compatible and additional computed target framework versions.
native native is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
Loading failed