Xm3.Http
1.0.0-rc.1
Prefix Reserved
dotnet add package Xm3.Http --version 1.0.0-rc.1
NuGet\Install-Package Xm3.Http -Version 1.0.0-rc.1
<PackageReference Include="Xm3.Http" Version="1.0.0-rc.1" />
<PackageVersion Include="Xm3.Http" Version="1.0.0-rc.1" />
<PackageReference Include="Xm3.Http" />
paket add Xm3.Http --version 1.0.0-rc.1
#r "nuget: Xm3.Http, 1.0.0-rc.1"
#:package Xm3.Http@1.0.0-rc.1
#addin nuget:?package=Xm3.Http&version=1.0.0-rc.1&prerelease
#tool nuget:?package=Xm3.Http&version=1.0.0-rc.1&prerelease
Xm3.Http
Small, dependency-light building blocks for calling HTTP APIs from .NET: Xm3HttpResult<T> (a
functional-style result type), IXm3JsonHttpClient (a typed JSON client), and pluggable JSON
via IXm3JsonStreamCodec (System.Text.Json implementation included). Targets net8.0 and
net10.0.
The core idea: HTTP calls return an Xm3HttpResult<T> that carries either the value or the
failure details, so a non-success status code is data you handle, not an exception you catch.
Getting started
services.AddXm3JsonHttpClient(client =>
client.BaseAddress = new Uri("https://api.example.com"));
public class OrdersClient(IXm3JsonHttpClient jsonHttpClient)
{
public async Task<Order?> GetOrderAsync(int orderId, CancellationToken cancellationToken)
{
var request = new HttpRequestMessage(HttpMethod.Get, $"orders/{orderId}");
var result = await jsonHttpClient.GetContentAsync<Order>(request, cancellationToken);
if (result.Failed)
{
// result.StatusCode / result.ErrorMessage tell you what happened
return null;
}
return result.Value;
}
}
Xm3HttpResult<T> also offers Match, Map/Bind (plus async variants), and
GetValueOrDefault for composing calls.
Related packages
Xm3.Http.NewtonsoftJson— a Newtonsoft.Json codec, when you need Json.NET behavior.Xm3.Http.Resilience— a Polly v8 retry + timeout handler for your registered clients.
Documentation
Full documentation, including working without DI, custom JSON settings, and handling envelope-style APIs: github.com/xm3tech/Xm3.Http.
Questions and bug reports are welcome — open an issue. Unclear documentation counts as a bug. Licensed MIT.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. 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 is compatible. 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. |
-
net10.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.9)
- Microsoft.Extensions.Http (>= 10.0.9)
- NodaTime.Serialization.SystemTextJson (>= 1.4.0)
-
net8.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.2)
- Microsoft.Extensions.Http (>= 8.0.1)
- NodaTime.Serialization.SystemTextJson (>= 1.4.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Xm3.Http:
| Package | Downloads |
|---|---|
|
Xm3.Http.NewtonsoftJson
Optional Newtonsoft.Json IXm3JsonStreamCodec implementation for Xm3.Http. Reference Xm3.Http alone for the default System.Text.Json implementation. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0-rc.1 | 107 | 7/10/2026 |