Changelog
All notable changes to Dangl.RestClient are documented here.
v5.0.1:
- Dangl.RestClient now also produces Markdown documentation. This can be easily accessed by AI agents via the MCP server implementation in DanglDocu.
- Build and test infrastructure now uses the .NET 11 SDK, with xUnit v3 tests on .NET 11 and full test parallelization. The library remains compatible with
netstandard2.0. CompressedContentnow propagates content-copy failures and cancellation instead of silently reporting success. Compression streams are disposed on success and failure while leaving the destination stream open.FallbackHandlernow retries only HTTP 5xx responses and transport failures, respects cancellation, disposes discarded responses, and buffers request bodies for replay using fresh request instances. Behavior change: only GET and HEAD retry by default; other methods requireRetryUnsafeMethods = trueor the correspondingAddDanglHttpClientoverload, and must be safe to repeat.- Authentication and fallback now share URI-aware matching for scheme, host, effective port and case-sensitive path boundaries, preventing hostname and path-prefix lookalikes from matching. Fallback preserves relative endpoint paths and queries across different base paths and prefers the most specific matching scope. Behavior change: base URLs must use HTTP(S) without credentials, queries or fragments; relative paths without a leading slash resolve beneath the configured base path even without a trailing slash.
- Added cancellation-token overloads for GET/POST/PUT JSON helpers and both response wrappers, while retaining all existing signatures and
netstandard2.0compatibility. JSON requests forward cancellation toHttpClient, skip pre-canceled payload serialization, and clean up canceled requests/responses. Behavior change: response wrapping now propagatesOperationCanceledExceptioninstead of converting cancellation into an unknown API error. Standalone content reading and synchronous JSON processing observe cancellation at operation boundaries. AuthenticationHandlernow coalesces automatic token acquisition and refresh per token-storage instance across concurrent requests and handler instances. Waiters share results or failures, can cancel independently, and later requests can retry failed updates. Storage is rechecked before updating; fresh tokens and separate credential stores are not blocked. Public token-provider/storage interfaces andnetstandard2.0compatibility remain unchanged; the initiating request observes cancellation after the uncancelable provider operation finishes.- Response wrappers now implement
IDisposable, own their returned response, and exposeErrorKindplusDeserializationExceptionto distinguish HTTP errors from invalid JSON bodies. JSON helpers dispose generated requests on every exit path and received responses when processing throws;CompressedContentnow disposes its owned original content. Behavior change: non-JSON/read failures propagate instead of becoming unknown API errors, and unexpectedly empty successful JSON bodies are invalid unless the response is 204, 205 or HEAD. Valid JSONnull, structured API errors, existing overloads andnetstandard2.0compatibility are preserved.
v5.0.0:
- Dangl.RestClient.Identity.TrustedServer now requires
net7.0as target framework - The package Dangl.RestClient.Identity.TrustedServer was removed
- The package Dangl.RestClient.Identity.Server was removed, it's
DanglIdentityServerTokenHandlerwas moved toDangl.Identity.Client - The package Dangl.RestClient.Identity.App was removed, it's
DanglIdentityAppTokenHandlerwas moved toDangl.Identity.Client.App
v4.0.0:
- Updated all dependencies to the latest Dangl.Identity versions
- Dangl.RestClient.Identity.TrustedServer now requires
net5.0as target framework
v3.0.1:
- Add
sdervices.AddDanglHttpClient<TService, TImplementation>()overload
v3.0.0
- The Dangl.Identity dependencies have been updated to v3.0.0
- The server side packages have been upgrade to
netcoreapp3.1, earlier frameworks are no longer supported
v2.0.0:
- Add
EventHandler<TokenUpdateEventArgs> TokenUpdatetoITokenHandlerinterface
v1.6.3:
- The
GzipHandlerno longer tries to compress requests that have no content. This causedArgumentNullExceptions when theGzipHandlerwas used when sending empty requests
v1.6.2:
- The
DanglIdentityAppTokenHandlerhas a new method that allows setting of user credentials after instantiation:void SetUserCredentials(string userIdentifier, string userPassword)
v1.6.1:
- Add NuGet package descriptions
v1.6.0:
- The generated assemblies now have a strong name. This is a breaking change of the binary API and will require recompilation on all systems that consume this package. The strong name of the generated assembly allows compatibility with other, signed tools. Please note that this does not increase security or provide tamper-proof binaries, as the key is available in the source code per Microsoft guidelines
v1.5.0:
- Update Dangl.Identity dependencies
v1.4.0:
- The method
ResponseWrapper.GetResponseWrapperwas renamed toResponseWrapper.GetResponseWrapperAsync
v1.3.0:
- Dependencies were updated to the latest versions, especially Dangl.Identity
- Tests now cover the
netcoreapp2.2framework, tests fornetcoreapp2.0were dropped
v1.2.2:
- Add
GzipHandler
v1.2.0:
- Refactoring to be usable with the
HttpClientFactory - The minimum requirement is now
netstandard2.0
v1.1.4:
- Replace
Dangl.Identity.OAuthpackage withDangl.Identity.Client.Mvc
v1.1.3:
- Dependencies update
- Internal refactoring
v1.1.2:
- Dependencies update
v1.1.1:
Dangl.RestClient.Identity.Serveris now public
v1.1.0
- Added Dangl.RestClient.Identity.TrustedServer package
- Refactoring to simplify setup of
DanglHttpClient
v1.0.2
- Add
ITokenHandlerto allow theAuthenticationHandlerto be able to obtain and refresh OAuth2 tokens - Add
Dangl.RestClient.Identity.AppandDangl.RestClient.Identity.Serverlibraries
v1.0.1
- Maintenance Release
- Add
netstandard2.0target
v1.0.0
- Initial Release