RextHttpClient 1.0.22
See the version list below for details.
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"
#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
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 | |
---|---|---|---|
1.0.23 | 217 | 9/16/2023 | |
1.0.22 | 335 | 3/10/2023 | |
1.0.20 | 320 | 3/9/2023 | |
1.0.19 | 314 | 2/13/2023 | |
1.0.18 | 345 | 2/13/2023 | |
1.0.17 | 337 | 2/9/2023 | |
1.0.16 | 327 | 2/7/2023 | |
1.0.14 | 414 | 11/2/2022 | |
1.0.13 | 474 | 8/18/2022 | |
1.0.11 | 509 | 6/10/2022 | |
1.0.10 | 763 | 2/21/2022 | |
1.0.9 | 655 | 11/4/2021 | |
1.0.8 | 5,143 | 4/22/2021 | |
1.0.8-beta1 | 504 | 2/22/2021 | |
1.0.7 | 547 | 12/11/2020 | |
1.0.6 | 527 | 7/21/2020 | |
1.0.4 | 646 | 12/10/2019 | |
1.0.3 | 623 | 10/27/2019 | |
1.0.3-beta | 575 | 10/24/2019 | |
1.0.2 | 581 | 10/24/2019 | |
1.0.1 | 621 | 9/18/2019 | |
1.0.0.1 | 616 | 9/9/2019 |
Http resiliency to retry certain statuscodes at intervals