RextHttpClient 1.0.22
dotnet add package RextHttpClient --version 1.0.22
NuGet\Install-Package RextHttpClient -Version 1.0.22
<PackageReference Include="RextHttpClient" Version="1.0.22" />
<PackageVersion Include="RextHttpClient" Version="1.0.22" />
<PackageReference Include="RextHttpClient" />
paket add RextHttpClient --version 1.0.22
#r "nuget: RextHttpClient, 1.0.22"
#:package RextHttpClient@1.0.22
#addin nuget:?package=RextHttpClient&version=1.0.22
#tool nuget:?package=RextHttpClient&version=1.0.22
Basic Usage
All basic API operations have been made available for quick access via IRextHttpClient. If you wish to make a direct call and handle deserialization yourself, then call _rext.MakeRequest method.
IRextHttpClient _rext = new RextHttpClient(); // create new instance via new or DI
Make http call with result deserialized to object.
string url = "http://myapp.com/api/employee/getemployee";
var rsp = await _rext.GetJSON<@Person>(url); // download json
var rsp = await _rext.GetXML<@Person>(url); // download xml
var rsp = await _rext.GetString(url); // download string
Console.WriteLine($"{rsp.StatusCode} - {rsp.Message} -
Duration: {_rext.Stopwatch?.ElapsedMilliseconds}ms"); // get duration of http call
Console.WriteLine(rsp?.Data); // get deserialized result as object
All Rext methods for http call have overloads for adding more options to suit your need. You supply a type of T and the result from the call is deserialized into it. To retrieve the result you have to check if the call was successful with _rext.IsSuccess, if the value is true then access the data with _rext.Data.
Note: Only successful responses (200) are deserialized by default. to allow deserialization for all response types, set RextOptions.DeserializeSuccessResponseOnly = false or from the global configuration section
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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. |
| .NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 is compatible. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- Newtonsoft.Json (>= 12.0.2)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on RextHttpClient:
| Package | Downloads |
|---|---|
|
SMEOne.Modules.Shared
Shared SMEOne library containing repositories, filters, utilities abstractions. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated | |
|---|---|---|---|
| 1.0.22 | 897 | 3/10/2023 | |
| 1.0.20 | 451 | 3/9/2023 | |
| 1.0.19 | 420 | 2/13/2023 | |
| 1.0.18 | 503 | 2/13/2023 | |
| 1.0.17 | 436 | 2/9/2023 | |
| 1.0.16 | 446 | 2/7/2023 | |
| 1.0.14 | 522 | 11/2/2022 | |
| 1.0.13 | 560 | 8/18/2022 | |
| 1.0.11 | 625 | 6/10/2022 | |
| 1.0.10 | 907 | 2/21/2022 | |
| 1.0.9 | 776 | 11/4/2021 | |
| 1.0.8 | 5,343 | 4/22/2021 | |
| 1.0.8-beta1 | 633 | 2/22/2021 | |
| 1.0.7 | 690 | 12/11/2020 | |
| 1.0.6 | 659 | 7/21/2020 | |
| 1.0.4 | 777 | 12/10/2019 | |
| 1.0.3 | 743 | 10/27/2019 | |
| 1.0.3-beta | 786 | 10/24/2019 | |
| 1.0.2 | 721 | 10/24/2019 | |
| 1.0.1 | 756 | 9/18/2019 | |
| 1.0.0.1 | 711 | 9/9/2019 |
Http resiliency to retry certain statuscodes at intervals