RestWrapper 1.0.8
See the version list below for details.
dotnet add package RestWrapper --version 1.0.8
NuGet\Install-Package RestWrapper -Version 1.0.8
<PackageReference Include="RestWrapper" Version="1.0.8" />
<PackageVersion Include="RestWrapper" Version="1.0.8" />
<PackageReference Include="RestWrapper" />
paket add RestWrapper --version 1.0.8
#r "nuget: RestWrapper, 1.0.8"
#:package RestWrapper@1.0.8
#addin nuget:?package=RestWrapper&version=1.0.8
#tool nuget:?package=RestWrapper&version=1.0.8
RestWrapper
A simple C# class library to help simplify RESTful HTTP requests and responses.
Test App
A test project is included which will help you exercise the class library.
Available APIs
Two static methods exist: SendRequest and SendRequestSafe. The differences are as follows:
- SendRequest will throw any exception encountered to the caller
- SendRequestSafe will take any WebException and create a RestResponse object from it. Other exceptions are thrown to the caller
Example
using RestWrapper;
//
// Simple GET with No Credentials
//
RestResponse resp = RestRequest.SendRequest(
	"http://www.github.com/",	// URL
	null, 						// content-type
	"GET",						// verb/method
	null, null, false, 			// user, password, encode
	null, 						// headers
	null);						// byte array data
//
// Enumerate response
//
Console.WriteLine(
	"Received " + resp.StatusCode + " (" + resp.ContentLength + " bytes) " +
	"with data: " + Encoding.UTF8.GetString(resp.Data));
//
// POST with Headers and Credentials
//
Dictionary<string, string> headers = new Dictionary<string, string>();
headers.Add("x-custom-header", "my-custom-value");
byte[] data = Encoding.UTF8.GetBytes("some-field=some-value&hello=world");
RestResponse resp = RestRequest.SendRequest(
	"https://my.server.com/form",			// URL
	"application/x-www-form-urlencoded",	// content-type
	"POST",									// verb/method
	"my-username", "my-password", true, 	// user, password, encode
	headers,								// headers
	data);									// byte array data
//
// Enumerate response
//
Console.WriteLine(resp.ToString());		// Easy peasy
| Product | Versions Compatible and additional computed target framework versions. | 
|---|---|
| .NET Framework | net is compatible. | 
This package has no dependencies.
NuGet packages (23)
Showing the top 5 NuGet packages that depend on RestWrapper:
| Package | Downloads | 
|---|---|
| KvpbaseSDK C# SDK for Kvpbase object storage platform | |
| Komodo.Sdk Client SDK in C# for Komodo. Please either install Komodo.Daemon to integrate search within your application, or Komodo.Server to run a standalone server if you wish to use this client SDK. Komodo is an information search, metadata, storage, and retrieval platform. | |
| GoogleMapsClient I needed a simple way to parse addresses and resolve coordinates to an address. Plug in a Google Maps API key and you're all set. | |
| SendWithBrevo A simple C# class library to help simplify sending emails using Brevo. | |
| View.Sdk C# SDK for View AI. | 
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on RestWrapper:
| Repository | Stars | 
|---|---|
| dotnet/WatsonWebserver 
                                                            Watson is the fastest, easiest way to build scalable RESTful web servers and services in C#.
                                                         | 
| Version | Downloads | Last Updated | 
|---|---|---|
| 3.1.8 | 1,581 | 10/4/2025 | 
| 3.1.7 | 212 | 10/1/2025 | 
| 3.1.6 | 502 | 9/19/2025 | 
| 3.1.5 | 4,663 | 3/10/2025 | 
| 3.1.4 | 3,567 | 1/22/2025 | 
| 3.1.3 | 485 | 12/13/2024 | 
| 3.1.2 | 5,438 | 12/10/2024 | 
| 3.1.1 | 188 | 12/10/2024 | 
| 3.1.0 | 586 | 12/2/2024 | 
| 3.0.22 | 837 | 10/29/2024 | 
| 3.0.21 | 4,015 | 8/27/2024 | 
| 3.0.20 | 4,207 | 5/21/2024 | 
| 3.0.19 | 4,117 | 3/27/2024 | 
| 3.0.18 | 1,365 | 1/16/2024 | 
| 3.0.17 | 4,565 | 11/25/2023 | 
| 3.0.16 | 533 | 11/10/2023 | 
| 3.0.15 | 510 | 11/10/2023 | 
| 3.0.14 | 1,296 | 10/21/2023 | 
| 3.0.12 | 592 | 10/20/2023 | 
| 3.0.11 | 570 | 10/20/2023 | 
| 3.0.10 | 1,030 | 10/6/2023 | 
| 3.0.9 | 534 | 10/6/2023 | 
| 3.0.8 | 1,697 | 9/4/2023 | 
| 3.0.7 | 598 | 9/4/2023 | 
| 3.0.6 | 663 | 9/1/2023 | 
| 3.0.5 | 665 | 8/31/2023 | 
| 3.0.4 | 635 | 8/31/2023 | 
| 3.0.3 | 1,445 | 8/24/2023 | 
| 3.0.2 | 21,057 | 7/23/2023 | 
| 3.0.1 | 1,400 | 7/12/2023 | 
| 3.0.0 | 797 | 7/12/2023 | 
| 2.3.2 | 3,704 | 3/27/2023 | 
| 2.3.1.1 | 35,220 | 9/4/2022 | 
| 2.3.1 | 2,836 | 8/15/2022 | 
| 2.3.0 | 1,055 | 8/15/2022 | 
| 2.2.1.15 | 1,987 | 8/11/2022 | 
| 2.2.1.14 | 13,265 | 11/19/2021 | 
| 2.2.1.13 | 31,801 | 11/12/2021 | 
| 2.2.1.12 | 5,360 | 8/14/2021 | 
| 2.2.1.11 | 7,082 | 5/10/2021 | 
| 2.2.1.10 | 4,666 | 2/15/2021 | 
| 2.2.1.9 | 1,055 | 2/15/2021 | 
| 2.2.1.8 | 1,423 | 2/11/2021 | 
| 2.2.1.7 | 1,135 | 2/11/2021 | 
| 2.2.1.6 | 2,377 | 1/21/2021 | 
| 2.2.1.5 | 2,750 | 12/28/2020 | 
| 2.2.1.4 | 11,738 | 11/16/2020 | 
| 2.2.1.3 | 4,629 | 11/15/2020 | 
| 2.2.1.2 | 1,562 | 10/24/2020 | 
| 2.2.1.1 | 1,192 | 10/24/2020 | 
| 2.2.1 | 1,298 | 10/23/2020 | 
| 2.2.0 | 1,260 | 10/23/2020 | 
| 2.1.5 | 1,515 | 10/15/2020 | 
| 2.1.4.2 | 14,797 | 9/10/2020 | 
| 2.1.4.1 | 130,878 | 1/17/2020 | 
| 2.1.4 | 14,150 | 12/5/2019 | 
| 2.1.3 | 11,942 | 10/28/2019 | 
| 2.1.2 | 4,768 | 9/22/2019 | 
| 2.0.4 | 5,050 | 6/13/2019 | 
| 2.0.3 | 2,039 | 6/5/2019 | 
| 2.0.2 | 1,520 | 4/30/2019 | 
| 1.0.9 | 7,555 | 3/10/2019 | 
| 1.0.8 | 5,033 | 8/11/2017 | 
| 1.0.7 | 1,914 | 6/23/2017 | 
| 1.0.6 | 1,974 | 5/14/2017 | 
| 1.0.5 | 1,983 | 10/11/2016 | 
| 1.0.4 | 1,900 | 10/7/2016 | 
Variable casing, conversion methods, suppor for OPTIONS