Corvus.Text.Json.OpenApi.HttpTransport
5.1.13
dotnet add package Corvus.Text.Json.OpenApi.HttpTransport --version 5.1.13
NuGet\Install-Package Corvus.Text.Json.OpenApi.HttpTransport -Version 5.1.13
<PackageReference Include="Corvus.Text.Json.OpenApi.HttpTransport" Version="5.1.13" />
<PackageVersion Include="Corvus.Text.Json.OpenApi.HttpTransport" Version="5.1.13" />
<PackageReference Include="Corvus.Text.Json.OpenApi.HttpTransport" />
paket add Corvus.Text.Json.OpenApi.HttpTransport --version 5.1.13
#r "nuget: Corvus.Text.Json.OpenApi.HttpTransport, 5.1.13"
#:package Corvus.Text.Json.OpenApi.HttpTransport@5.1.13
#addin nuget:?package=Corvus.Text.Json.OpenApi.HttpTransport&version=5.1.13
#tool nuget:?package=Corvus.Text.Json.OpenApi.HttpTransport&version=5.1.13
Corvus.Text.Json.OpenApi.HttpTransport
HttpClient-based transport implementation for Corvus OpenAPI generated clients.
Usage
using Corvus.Text.Json.OpenApi;
using Corvus.Text.Json.OpenApi.HttpTransport;
await using var transport = new HttpClientTransport(new HttpClient
{
BaseAddress = new Uri("https://api.example.com"),
});
var client = new PetstorePetsClient(transport);
using ApiResponse response = await client.ListPetsAsync();
response.EnsureSuccess();
using var doc = ParsedJsonDocument<Pets>.Parse(response.Body);
// ... work with doc.RootElement ...
Design
This package provides a single type — HttpClientTransport — that bridges generated client code to System.Net.Http.HttpClient. Response bodies are read into ArrayPool<byte>-rented buffers, enabling zero-copy parsing via ParsedJsonDocument<T>.Parse(ReadOnlyMemory<byte>).
The transport is shipped in a separate assembly so consumers don't pull in HTTP dependencies unless they need them. Alternative transports (e.g. for testing, gRPC, or message queues) can implement IApiTransport independently.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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
- Corvus.Text.Json.OpenApi (>= 5.1.13)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.