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" />
paket add RextHttpClient --version 1.0.22
#r "nuget: RextHttpClient, 1.0.22"
// Install RextHttpClient as a Cake Addin #addin nuget:?package=RextHttpClient&version=1.0.22 // Install RextHttpClient as a Cake Tool #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. |
.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 | 176 | 9/16/2023 | |
1.0.22 | 295 | 3/10/2023 | |
1.0.20 | 284 | 3/9/2023 | |
1.0.19 | 291 | 2/13/2023 | |
1.0.18 | 308 | 2/13/2023 | |
1.0.17 | 313 | 2/9/2023 | |
1.0.16 | 302 | 2/7/2023 | |
1.0.14 | 386 | 11/2/2022 | |
1.0.13 | 442 | 8/18/2022 | |
1.0.11 | 471 | 6/10/2022 | |
1.0.10 | 660 | 2/21/2022 | |
1.0.9 | 611 | 11/4/2021 | |
1.0.8 | 4,933 | 4/22/2021 | |
1.0.8-beta1 | 456 | 2/22/2021 | |
1.0.7 | 488 | 12/11/2020 | |
1.0.6 | 461 | 7/21/2020 | |
1.0.4 | 584 | 12/10/2019 | |
1.0.3 | 559 | 10/27/2019 | |
1.0.3-beta | 468 | 10/24/2019 | |
1.0.2 | 515 | 10/24/2019 | |
1.0.1 | 556 | 9/18/2019 | |
1.0.0.1 | 552 | 9/9/2019 |
Http resiliency to retry certain statuscodes at intervals