bleak.Api.Rest 2.3.22

dotnet add package bleak.Api.Rest --version 2.3.22
                    
NuGet\Install-Package bleak.Api.Rest -Version 2.3.22
                    
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="bleak.Api.Rest" Version="2.3.22" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="bleak.Api.Rest" Version="2.3.22" />
                    
Directory.Packages.props
<PackageReference Include="bleak.Api.Rest" />
                    
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 bleak.Api.Rest --version 2.3.22
                    
#r "nuget: bleak.Api.Rest, 2.3.22"
                    
#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 bleak.Api.Rest@2.3.22
                    
#: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=bleak.Api.Rest&version=2.3.22
                    
Install as a Cake Addin
#tool nuget:?package=bleak.Api.Rest&version=2.3.22
                    
Install as a Cake Tool

bleak.Api is a tool for managing API access using either REST or SOAP.

RestManager is the main star. SOAP will come back at a later date.

Usage:

    var s = "https://google.com";
    var restManager = new RestManager(serializer, serializer);
    var results = restManager.ExecuteRestMethod<string, string>(uri: new Uri(s), verb: HttpVerbs.GET);

TSuccess is the type of the object returned on success TError is the type of object returned on error.

Perfectly valid to use strings. Can also use POCOs. If you want more sophisticated [de]serialization options, you can always implement your own ISerializer

Current Features

  • Basic invocation of REST endpoints.
  • invocations of really any HTTP/HTTPS endpoint, if you know how to serialize/deserialize the data.
  • header management
  • app identication.
  • async and sync methods
  • automagic serialization/deserialization for payloads/responses.
  • 1000000% more friendly to folks who want to build apps quickly and efficiently than RESTSharp. No hate. RESTSharp saved my ass many times. But this is better. Designed to be easier to get started, easier to get data out of the HTTP Request, and easier to work with C# POCOs.
  • The Unlicense. I don't really care how you use it. You're not paying me. And youy're free to fork this as you see fit. Also, welcome to drop a PR to the Github Repo.

Currently possible with some effort:

  • Invoking SOAP calls
  • working with XML based APIs

Currently technically possible but unsupported:

  • cookies. If you read the code, I've stubbed out some cookie management. TBD at some point.
  • Form Data. Also stubbed out.
  • I'ms ure a ton of other stuff.

Tested against some of the following APIs:

  • Salesforce Marketing Cloud
  • Several Other ESPs and/or CDPs
  • Azure REST APIs.
  • Internal REST Apps.

Coming in the not too distant future.

  • Proper SOAP support
  • More Unit Tests
  • Integration Tests
  • Automated deployment of NUGET packages (Azure DevOps deployment is currently broken)
  • Retry logic for use with things like OAUTH based authentication. You can totally do OAuth manually right now... just make an AuthRequest, and then attach the auth variable.

If you like what I do, you're welcome to buy me a coffee.

Bitcoin Address: bc1qrwysp9a5mqthnz6aygn527xjkg58lcd7u5jdz5 Solana Address: 9Y8ZUL1MqXQkE5D2Qj9gx5mgkXkXct22jkQ3Ucj5z5N3 Ethereum Address: 0xA38305025bF8D7c9d92F73193CD5A70E9B030208

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.3.22 263 8/21/2025
2.3.21 186 8/12/2025
2.2.20 204 8/12/2025
2.2.19 156 7/28/2025
2.2.16 287 3/3/2025
2.2.0 259 3/3/2025
2.1.0 172 1/2/2025
2.0.0 178 12/2/2024
1.1.0 731 9/11/2020
1.0.9 642 9/11/2020
1.0.1 715 12/5/2019
1.0.0 845 12/29/2018
0.12.0 858 12/27/2018
0.9.0 1,488 7/19/2018
0.8.0 1,437 7/18/2018