JTigerNova.jtiger.network
1.0.0
dotnet add package JTigerNova.jtiger.network --version 1.0.0
NuGet\Install-Package JTigerNova.jtiger.network -Version 1.0.0
<PackageReference Include="JTigerNova.jtiger.network" Version="1.0.0" />
<PackageVersion Include="JTigerNova.jtiger.network" Version="1.0.0" />
<PackageReference Include="JTigerNova.jtiger.network" />
paket add JTigerNova.jtiger.network --version 1.0.0
#r "nuget: JTigerNova.jtiger.network, 1.0.0"
#:package JTigerNova.jtiger.network@1.0.0
#addin nuget:?package=JTigerNova.jtiger.network&version=1.0.0
#tool nuget:?package=JTigerNova.jtiger.network&version=1.0.0
jtiger.network
.NET library providing a resilient HTTP api client base, built on RestSharp.
Retries transport failures with linear backoff and builds a fresh client per attempt, so a retry never reuses a faulted connection. No I/O beyond the request itself.
ResilientApiClient
Derive from it and implement GetApiUrlEndpoint to map a relative url onto your base endpoint:
public sealed class MyApi : ResilientApiClient
{
private readonly string baseUrl;
public MyApi(string baseUrl) { this.baseUrl = baseUrl; }
protected override string GetApiUrlEndpoint(string relativeUrl) => $"{baseUrl}/{relativeUrl}";
public Task<(IRestResponse Response, Uri BaseUrl)> GetWidget(string id)
=> ExecuteGet($"widgets/{id}");
}
Verb helpers - ExecuteGet, ExecutePost, ExecutePut, ExecutePatch, ExecuteDelete - take optional headers and form parameters. For anything richer (file uploads, query params, custom serialization) use the configureRequest overload:
var (response, baseUrl) = await Execute(
method: Method.POST,
relativeUrl: "media/upload",
configureRequest: req => req.AddFile("file", path),
timeoutMs: 120_000);
Retry behavior
A request is attempted up to TransportAttempts times. An attempt is retried only when ResponseStatus != Completed - that is, on transport failure. A completed request is returned as-is, so HTTP 4xx/5xx are never retried; the caller decides what those mean.
With the defaults (3 attempts, 100ms base) a fully failing request waits 100ms, then 200ms, then gives up.
Each attempt constructs a new RestClient and RestRequest, which is what keeps a retry from reusing a connection that just faulted.
Timeouts
protected virtual int RequestTimeout => ApiClientDefaults.RequestTimeout;
protected virtual int RequestTimeoutExtended => ApiClientDefaults.RequestTimeoutExtended;
EnableExtendedTimeout switches between the two. Override either property to change them for your client, or pass timeoutMs to Execute for a single call.
ResilientJTigerNovaApiClient
Adds endpoint resolution for the three JTiger Nova environments.
public sealed class MyNovaApi : ResilientJTigerNovaApiClient
{
public MyNovaApi(bool isLocal, bool isProduction) : base(isLocal: isLocal, isProduction: isProduction) { }
protected override string ApiLocal => "http://localhost:5000";
protected override string ApiTest => "https://test.example.com";
protected override string ApiProduction => "https://api.example.com";
protected override string ApiVersion => "v1";
}
isLocal takes precedence over isProduction. The resolved path is exposed as Api, and
IsApiPathKnown reports whether that path and ApiVersion are both present - useful when the
paths come from configuration or a business rather than constants, so a client can bail
before issuing a request that would go nowhere.
Defaults
| Constant | Value |
|---|---|
RequestTimeoutShort |
15000 ms |
RequestTimeout |
30000 ms |
RequestTimeoutExtended |
45000 ms |
TransportAttempts |
3 |
TransportRetryBaseDelayMs |
100 ms |
Dependencies
- RestSharp
License
MIT License - Copyright 2026 JTiger Nova
| 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 | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 is compatible. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
NuGet packages (2)
Showing the top 2 NuGet packages that depend on JTigerNova.jtiger.network:
| Package | Downloads |
|---|---|
|
JTigerNova.Web.Lib.Service.JTigerNova
Library of standard web service functions and support |
|
|
JTigerNova.jtiger.apiclient
Client library for the JTiger Nova platform apis. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 62 | 8/13/2026 |
v1.0.0:
- ResilientApiClient: abstract api client with transport-failure retry
- configurable attempt count and linear backoff delay
- fresh RestClient/RestRequest per attempt, so a retry never reuses a faulted connection
- GET/POST/PUT/PATCH/DELETE helpers plus a configureRequest overload for files and query params
- standard and extended timeouts, with a per-request override