Releases: justeattakeaway/httpclient-interception
Releases · justeattakeaway/httpclient-interception
JustEat.HttpClientInterception v3.0.0
Added
- Add support for async custom matching. (#130)
- Improve exceptions thrown for missing registrations. (#130)
- Add net472 as a target framework. (#127)
- Add support for the new System.Text.Json APIs. (#127)
- Add
netstandard2.1
as a target framework. (#127) - Add nullable reference type annotations. (#127)
- Add support for cancellation tokens to
OnIntercepted()
(#144) Thanks @slang25!
Changes
- Add analyzer for public API surface. (#132)
- Remove Newtonsoft.Json from the public surface area of the API. (#127)
- Use Microsoft.NETFramework.ReferenceAssemblies to compile .NET Framework versions on non-Windows platforms. (#127)
- Use C# 8. features. (#127)
Fixes
- Fix typos in XML documentation. (#127)
Removed
- Remove support for .NET Standard 1.3. (#127)
Contributors
JustEat.HttpClientInterception v2.0.2
JustEat.HttpClientInterception v2.0.1
Fixes
- Fixed custom
content-type
HTTP response headers not being used for HTTP bundles. (#84)
Contributors
JustEat.HttpClientInterception v2.0.0
Added
- Add support for matching requests to intercept by HTTP request headers. (#57)
- Add
ThrowsOnMissingRegistration()
extension method toHttpClientInterceptorOptions
. (#57) - Add support for configuring requests to intercept using "bundle files" in JSON format. (#72)
Changes
- Apply Microsoft best-practices for Open-source libraries. (#56)
- Assembly is now strong-named.
- Improvements to NuGet package metadata.
- Use portable PDBs. (#66)
- Set up continuous integration using Azure DevOps Pipelines. (#67)
- Use the new
snupkg
format for the NuGet symbol package. (#77) - Update tests to use .NET Core 2.2. (#44)
- Update sample application for ASP.NET Core 2.2. (#44)
Contributors
JustEat.HttpClientInterception v2.0.0-beta1
Added
- Add support for matching requests to intercept by HTTP request headers. (#57)
- Add
ThrowsOnMissingRegistration()
extension method toHttpClientInterceptorOptions
. (#57) - Add support for configuring requests to intercept using "bundle files" in JSON format. (#72)
Changes
- Apply Microsoft best-practices for Open-source libraries. (#56)
- Assembly is now strong-named.
- Improvements to NuGet package metadata.
- Use portable PDBs. (#66)
- Set up continuous integration using Azure DevOps Pipelines. (#67)
- Update tests to use .NET Core 2.2. (#44)
- Update sample application for ASP.NET Core 2.2. (#44)
Contributors
JustEat.HttpClientInterception v1.2.2
Added
- Add convenience method
WithFormContent()
for URL-encoded form content. (#32) - Added
netstandard2.0
target framework. (#34)
Changes
- Add support for Source Link. (#15, #16, #23)
- Update tests to use .NET Core 2.1. (#23)
- Update sample application for ASP.NET Core 2.1. (#23)
- Update sample code and documentation to show usage with
IHttpClientFactory
. (#23) - Collect memory allocation details in benchmarks. (#23)
- Add Roslyn source analyzers and fix issues found by them. (#29)
- Use
ConfigureAwait(false)
for internal awaits to remove potential for deadlocks if used in a UI application. (#29) - Add C#-specific EditorConfig settings. (#35)
- Remove obsolete MSBuild code. (#39) Thanks @slang25!
- Add GitHub issue templates. (#40)
- Various improvements to build scripts, test dependencies and the .NET Core SDK version used.
- Add assets to allow running the tests from Visual Studio Code.
- Ignore Rider files in
.gitignore
. (#51) Thanks @josephwoodward! - Fix build on macOS/Linux if
build.sh
wasn't used. (#51) Thanks @josephwoodward!
Contributors
JustEat.HttpClientInterception v1.2.1
JustEat.HttpClientInterception v1.2.0
Overview
This version adds various changes to make it easier to intercept requests based on arbitrary conditions you provide, as well as to ignore the hostname and/or path for requests.
It also adds some new methods to make the fluent API for HttpRequestInterceptionBuilder
easier to use.
Thanks to @stephenthrelfall for raising the issue (#20) that lead to these changes 👍
Below is an example comparing the previous (and still usable) syntax compared to the new syntax options:
1.0.0+
var builder = new HttpRequestInterceptionBuilder()
.ForHost("public.je-apis.com")
.ForPath("terms")
.WithJsonContent(new { Id = 1, Link = "https://www.just-eat.co.uk/privacy-policy" });
var options = new HttpClientInterceptorOptions()
.Register(builder);
1.2.0+
var options = new HttpClientInterceptorOptions();
var builder = new HttpRequestInterceptionBuilder()
.Requests()
.ForHost("public.je-apis.com")
.ForPath("terms")
.Responds()
.WithJsonContent(new { Id = 1, Link = "https://www.just-eat.co.uk/privacy-policy" })
.RegisterWith(options);
Changes
- Support arbitrary request matching using the new
For(Predicate<HttpRequestMessage>)
method onHttpRequestInterceptionBuilder
. This also adds a complementaryHavingPriority(int?)
method that allows multiple different predicates to be registered with a hierarchy. (#21) - Add
Deregister(HttpRequestInterceptionBuilder)
convenience method toHttpClientInterceptorOptions
. (#21) - Support configuring
HttpRequestInterceptionBuilder
to ignore the request hostname by usingForAnyHost()
. (#20, #21) - Support configuring
HttpRequestInterceptionBuilder
to ignore the request path by usingIgnoringPath()
. (#21) - Add
OnMissingRegistration
property toHttpClientInterceptorOptions
to allow dynamically building a response for any requests that do not match any registered interceptions. (#20, #21) - Add
RegisterWith(HttpClientInterceptorOptions)
extension method toHttpRequestInterceptionBuilder
to make it easier to chain multiple registrations fluently. (#21) - Add no-op
Requests()
andResponds()
extension methods toHttpRequestInterceptionBuilder
which can be used to make fluent usage of the type more expressive in intent. (#21)
Contributors
JustEat.HttpClientInterception v1.1.0
Changes
- Support conditional request interception (#9)
- Add option to ignore query strings (#10)
- Add convenience overload methods for registering multiple interceptions at once (#11, #13)
- Documentation and example improvements (#12, #17)
- Now tested on OS X as part of our continuous integration (#18)
Contributors
JustEat.HttpClientInterception v1.0.0
First release.
Package available on NuGet.