Winglet.Client 0.2.0

dotnet add package Winglet.Client --version 0.2.0
                    
NuGet\Install-Package Winglet.Client -Version 0.2.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Winglet.Client" Version="0.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Winglet.Client" Version="0.2.0" />
                    
Directory.Packages.props
<PackageReference Include="Winglet.Client" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Winglet.Client --version 0.2.0
                    
#r "nuget: Winglet.Client, 0.2.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Winglet.Client@0.2.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Winglet.Client&version=0.2.0
                    
Install as a Cake Addin
#tool nuget:?package=Winglet.Client&version=0.2.0
                    
Install as a Cake Tool

Winglet.Client

Winglet.Client is the small shared HTTP infrastructure for maintained Winglet service-owned typed clients. A service package owns its semantic operations, routes and Contracts DTOs, then composes this package for common endpoint configuration, authentication, error handling, resilience and optional logical correlation.

Registration

Service packages register their typed client and select the service key and wire profile:

services.AddHttpClient<IPartyClient, PartyClient>()
    .AddWingletClientInfrastructure(
        configuration,
        "Party",
        WingletRemoteContractProfile.Canonical);

The endpoint is deployment configuration under:

Winglet:Clients:Party:BaseUrl

It must be an absolute HTTP or HTTPS URI without embedded credentials. A reverse-proxy path prefix belongs in the configured URL when deployment requires one.

Service-client baseline

A maintained service client normally lives in src/Winglet.<Service>.Client/ with a typed interface, implementation, options, requests/models and service-owned exceptions; tests live in tests/Winglet.<Service>.Client.Tests/. The service package owns routes, query/body DTOs and semantic validation. Winglet.Client owns the IHttpClientFactory pipeline, delegated token-provider boundary, correlation, transport/resilience and common error parsing.

Client options should normally contain only the service BaseUrl. They must not duplicate issuer, JWT, tenant, privilege, token-cache or generic retry configuration. A normal tenant-scoped operation uses the caller tenant from the authenticated token context; a TenantId parameter is reserved for an API operation that explicitly targets another tenant.

Use typed records and value types for public contracts. A 2xx response with a missing or malformed required contract is a WingletClientContractException, not a successful result. Clients expose stable reusable operations only; internal/provider-specific endpoints and generic raw transport are excluded by default. /self is a separate delegated-human use case and must not be assumed to work with service-only tokens. Long-running operations expose StartOperationAsync/GetOperationAsync rather than hidden polling loops.

The baseline targets the repository's current net10.0 runtime; clients do not lower their TFM speculatively. Package metadata, README, symbols and central package versions are required for reusable client packages.

Concurrency and write conventions

WingletClientResponseReader.ReadResourceAsync<T> returns the resource and an optional ETag. A write that requires optimistic concurrency accepts an ETag explicitly and can use WingletClientHeaders.SetIfMatch; HTTP 412 is never automatically retried. SetIdempotencyKey forwards the caller's key unchanged; the shared client never silently creates or replaces a key.

WingletRemoteApiException is the common structured ProblemDetails failure for non-success HTTP responses. WingletTransportException represents reachability/timeouts, WingletProtocolException represents an unsupported HTTP/error protocol, and WingletClientContractException represents an invalid required success payload. None of these exceptions is specialized per business error code. The standard resilience pipeline retries only bounded transient safe requests; mutating retries require explicit idempotency semantics and 409/412 are not replayed automatically.

Boundaries

The package exposes an outbound IWingletClientTokenProvider boundary. A service operation marks its required service-only or on-behalf-of token semantics using WingletClientRequestOptions; the application caller does not choose authentication mode at each call site. The package never parses JWTs or forwards an inbound bearer token implicitly.

Canonical Problem Details failures are exposed as WingletRemoteApiException, while transport failures and malformed protocol responses use WingletTransportException and WingletProtocolException. LegacyErrorEnvelope is a contained compatibility profile for the known legacy { error, message, details, correlationId } shape. It does not invent a stable code when the legacy response does not provide one.

The standard .NET HTTP resilience pipeline uses bounded timeouts and transient retries for safe methods. Unsafe methods such as POST and PATCH are excluded from blind automatic retry. Technical tracing remains native HttpClient / Activity / W3C propagation. X-Correlation-Id is sent only when an application-provided IWingletCorrelationIdAccessor has a logical correlation value; X-Request-Id is not generated.

This package is not a universal client, service registry, generated-client framework, JWT/authentication authority, tracing framework or business orchestration layer. It is deliberately independent of the implementation language of the target service.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (11)

Showing the top 5 NuGet packages that depend on Winglet.Client:

Package Downloads
Winglet.Authentication

Shared Winglet.NET authentication and trusted request-context integration.

Winglet.Auth.Client

Package Description

Winglet.Party.Client

Typed Winglet.NET Party API v1 HTTP client.

Winglet.Messenger.Client

Typed Winglet.NET Messenger service client.

Winglet.Templify.Client

Typed Winglet.Templify client for tenant-scoped rendering.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.2.0 302 9/6/2026
0.1.0 203 9/5/2026