Skip to content

Releases: kampute/http-client

2.5.0

21 Dec 12:35
Immutable release. Only release title and notes can be modified.
bd5356b

Choose a tag to compare

This release focuses on improved HTTP resiliency and platform updates.

Enhancements

  • Introduced a unified retry mechanism for transient HTTP errors via the new RetryableHttpErrorHandler abstract base class.
  • Added the TransientHttpErrorHandler class, enabling a single handler to manage retries across multiple HTTP status codes.

Platform & Dependency Updates

  • Added support for .NET 10.0.
  • Updated JSON dependencies to newer major versions with automatic minor and patch updates.

2.4.0

15 Nov 09:24
Immutable release. Only release title and notes can be modified.
b6ac5cf

Choose a tag to compare

This release updates key JSON serialization dependencies to ensure improved compatibility and performance across the Kampute.HttpClient packages.

Key Updates

  • System.Text.Json upgraded from 8.0.6 → 10.0.0 in Kampute.HttpClient.Json.
  • Newtonsoft.Json upgraded from 13.0.3 → 13.0.4 in Kampute.HttpClient.NewtonsoftJson.

2.3.2

10 Nov 10:56
Immutable release. Only release title and notes can be modified.
953dabf

Choose a tag to compare

This maintenance release focuses on improving documentation, updating dependencies, and optimizing the build process.

Code Refactoring

  • Refactored the default constructor of the SharedDisposable<T> class to use constructor delegation.

Documentation Improvements

  • Migrated documentation generation workflow from DocFX to Kampose for a more modern and maintainable setup, with automated documentation completeness auditing.
  • Added NamespaceDoc classes to provide namespace-level documentation.
  • Added missing <value> and <returns> tags in XML comments.
  • Fixed various XML documentation formatting and consistency issues.

Dependency Updates

  • Updated System.Text.Json package reference to version 8.0.6.
  • Updated test project dependencies to their latest stable versions.

Build and Project Changes

  • Disabled package generation on build for all projects.
  • Updated the README file with the latest information and usage details.

2.3.1

27 Jul 08:36
796081a

Choose a tag to compare

This release brings crucial security improvements, minor fixes, and upgrades:

  • Increased the minimum version of the System.Text.Json package due to a severe vulnerability in the previous version.
  • Fixed various typos in the documentation to improve readability and understanding.
  • Upgraded the .NET version of the test projects to 8.0 due to the end of life of the previously used version, 6.0, ensuring continued support and access to the latest features.

Thank you for your continued support and feedback!

2.3.0

11 May 15:50
ee8f935

Choose a tag to compare

This release introduces a new feature, several enhancements, and improves clarity in method naming:

  • Added the HttpRequestScope class, which allows for scoped modifications of properties and headers for HTTP requests sent using the HttpRestClient. This feature enables developers to configure and reuse scopes across different parts of the application, improving modularity and reducing redundancy.
  • Introduced the WithScope extension method for the HttpRestClient class, making it straightforward to create and manage these scopes. This method ensures that all modifications are temporary and only apply to the requests made within the scope.
  • Improved error messages in case of response deserialization failures to enhance clarity and provide more detailed information.
  • Added With prefix to extension methods modifying retry strategies, ensuring consistency and clarity in the API's method naming conventions.

Thank you for your continued support and feedback!

2.2.1

08 May 08:22
d6af688

Choose a tag to compare

This release includes a bug fix and several minor optimizations:

  • Resolved an ArgumentNullException in the FlyweightCache class's default constructor that could occur under certain conditions.
  • Added the HasActiveScope property to the ScopedCollection class, allowing for straightforward detection of active scopes.
  • Eliminated lazy initialization of property and header scopes in the HttpRestClient class to reduce unnecessary overhead.

Thank you for your attention to this release!

2.2.0

07 May 09:38
f429ecc

Choose a tag to compare

This release introduces improved flexibility for managing headers and properties within scopes:

  • The BeginHeaderScope method now allows for the removal of headers. To remove a header during the scope's lifetime, in the collection of scoped headers, simply set its value to null.
  • Similarly, the BeginPropertyScope method facilitates the removal of request properties by setting the property value to null.

These changes ensure more dynamic control over HTTP headers and properties, simplifying customization per request.

Thank you for your attention to this update!

2.1.1

06 May 10:25
f4fec3d

Choose a tag to compare

In this release, we have addressed a bug.

  • Corrected the definition of delegate used in the HttpError401Handler class, changing type of its context parameter from HttpRequestErrorContext to HttpResponseErrorContext.

Thank you for your attention to this update!

2.1.0

06 May 07:53
b552dc7

Choose a tag to compare

In this release, we focused on refining content deserialization handling and enhancing documentation clarity. Check out what’s new:

  • Introduced lazy caching in the HttpContentDeserializerCollection class to optimize performance and resource utilization.
  • Modified the FlyweightCache class by replacing its indexer with a method because, unlike an indexer, a method can be used as a delegate.
  • Updated the minimum required version of the System.Text.Json library in the Kampute.HttpClient.Json package from 8.0.2 to 8.0.3, to ensure utilization of a bug-free library.
  • Enhanced various parts of our documentation to provide clearer and more detailed information.

Thank you for your ongoing support and look forward to your feedback on these enhancements!

2.0.0

05 May 07:42
9cdd999

Choose a tag to compare

In this update, we are excited to announce significant enhancements designed to boost performance, optimize resource utilization, and increase the flexibility of our library. Here is what's new:

  • Enhanced performance and reduced memory usage across the library, ensuring more efficient operation.
  • Improved the maintainability, reusability, and extensibility of the codebase, paving the way for easier future enhancements.
  • Introduced the ability to define headers and properties scoped specifically to individual request blocks, enhancing customization and control.
  • Added new extension methods to the HttpRestClient class, enabling responses to be obtained as an array of bytes, a string, a stream, or saved directly into a stream.
  • Introduced EmptyContent, representing HTTP content with no data, ideal for specific request scenarios.
  • Launched new utility classes including ScopedCollection, FlyweightCache, and SharedHttpClient to support advanced resource management and sharing strategies.
  • Improved the interface of the SharedDisposable<T> class, enhancing its usability in resource management contexts.

This release includes a major code rewrite, which brings some breaking changes detailed below:

  • The default constructor of the HttpRestClient class now utilizes a shared HttpClient with default configuration. This change simplifies setup but alters behavior related to compressed responses. Customization of this behavior is now possible through the SharedHttpClient.Factory delegate.
  • If the default request headers of the HttpRestClient include an Accept header, the library will not dynamically evaluate the Accept header based on the configured response deserializers and expected response object type. This change reduces unnecessary resource consumption when the expected response media types are predetermined by the caller.
  • The non-generic SendAsync method of HttpRestClient now returns an HttpResponseMessage rather than just HttpResponseHeaders, providing greater flexibility in response processing.
  • Removed the FetchToStream extension method in favor of specific methods tailored to fetch responses as bytes, strings, streams, or to save directly into a stream.
  • Renamed the AsyncGuard<T> class to AsyncUpdateThrottle<T> to better reflect its functionality, with LastUpdateUnixTime now called LastUpdatedTime, returning a DateTimeOffset instead of Unix time.
  • The Acquire method in SharedDisposable<T> has been renamed to AcquireReference, changing its return type to a disposable object enclosing the shared instance, thus removing the need for a Release method.
  • The IRetrySchedulerFactory has been renamed to IBackoffStrategy, and the corresponding extension method from IRetryStrategy is now ToBackoffStrategy.
  • Simplified the delegate parameters for HttpError401Handler to include only the HttpResponseErrorContext and a cancellation token.
  • The GetAcceptableMediaTypes method in HttpContentDeserializerCollection now returns an enumerable of media types as strings, instead of a read-only collection of MediaTypeWithQualityHeaderValue objects.
  • Removed unused dictionary extension methods to streamline the codebase.

We appreciate your feedback and support, which are vital in guiding our continuous development and enhancement efforts.

Thank you!