SwiftHttp: lightweight, safe, efficient HTTP client with transient retries and jittered exponential backoff. .NET Standard 2.1.
$ dotnet add package SwiftHttpSwiftHttp is a lightweight, safe, and efficient HTTP client for .NET Standard 2.1
with built-in transient error handling, configurable retries, and jittered exponential backoff.
Designed for high-performance applications that need resilience without the weight of large dependencies.
dotnet add package SwiftHttp
using SwiftHttp;
using System;
using System.Net.Http;
using System.Threading.Tasks;
class Program
{
static async Task Main()
{
var client = new SwiftHttpClient(new SwiftHttpOptions
{
MaxRetries = 3,
BaseDelay = TimeSpan.FromMilliseconds(200),
MaxDelay = TimeSpan.FromSeconds(10),
UseJitter = true
});
using var response = await client.GetAsync("https://httpbin.org/status/503");
Console.WriteLine($"Status: {response.StatusCode}");
}
}
Retry-After header for polite API usageHttpClientdotnet test
src/SwiftHttp/ # Library
tests/SwiftHttp.Tests/ # Unit tests
examples/ConsoleDemo/ # Sample console app
Contributions are welcome!
MIT License – see LICENSE for details.
Copyright (c) 2025 Junilo Pagobo