RichardSzalay.MockHttp 6.0.0

Testing layer for Microsoft's HttpClient library

Install-Package RichardSzalay.MockHttp -Version 6.0.0
dotnet add package RichardSzalay.MockHttp --version 6.0.0
<PackageReference Include="RichardSzalay.MockHttp" Version="6.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add RichardSzalay.MockHttp --version 6.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: RichardSzalay.MockHttp, 6.0.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install RichardSzalay.MockHttp as a Cake Addin
#addin nuget:?package=RichardSzalay.MockHttp&version=6.0.0

// Install RichardSzalay.MockHttp as a Cake Tool
#tool nuget:?package=RichardSzalay.MockHttp&version=6.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Release Notes

6.0.0 - Assemblies are now strong named (binary BREAKING) #1
5.0.0 - Align with official recommendations on multi-targetting HttpClient:
     - Add netstandard2.0 target #61
     - Change .NET 4.5 target to use in-band System.Net.Http reference (BREAKING) #61
     - Remove PCL profile 111 (BREAKING) #18
4.0.0 - Default Fallback message now includes request method and URL (BREAKING)
     - Deprecated FallbackMessage property removed (BREAKING)
3.3.0 - Added overloads for including custom headers in the response (thanks Sascha Kiefer!)
3.2.1 - XML documentation is now included in the NuGet package. Fixes #52
3.2.0 - MockHttpMessageHandler now tracks successful matches. Fixes #35
     - Added WithExactQueryString / WithExactFormData overloads. Fixes #37
     - Added BackendDefinitionBehavior to allow matching Backend Definitions when Request Expectations exist, but don't match. Fixes #45
     - Fixed typo in Response(HttpResponseMessage) obsolete message. Fixes #44
3.1.0 - Bump major version. Fixes #50
1.5.1 - Respond(HttpClient) now works as expected. Fixes #39
     - HttpResponseMessage can be disposed without breaking future requests. Fixes #33
1.5.0 - WithHeaders now also matches against Content-* headers (thanks Cory Lucas!)
1.4.0 - Cancellations and HttpClient timeouts are now supported. Fixes #29
     - Added a .ToHttpClient() convenience method to HttpClientHandler
1.3.1 - Multiple requests to the same mocked handler now return unique response streams. Fixes #21
1.3.0 - Added support for .NET Core via the .NET Standard Library (1.1)
   - Relative URLs now match correctly on Xamarin Android
1.2.2 - Root absolute URLs defined with no trailing flash now match those with a slash (and vice versa)
1.2.1 - HttpResponseMessage.RequestMessage is now assigned correctly
   - Form/Query data matching now works with both + and %20 space encodings (thanks Jozef Izso!)
1.2.0 - Changed PCL profile to support WP8.1
1.1.0 - Added MockHttpMessageHandler.Fallback and HttpClient passthrough support

NuGet packages (8)

Showing the top 5 NuGet packages that depend on RichardSzalay.MockHttp:

Package Downloads
Patros.MockHttpExtensions
This library is a small collection of extension methods for Richard Szalay's excellent MockHttp.
comsec.sugar.moq
A lean collection of classes to make it easier to mock multiple dependencies for a unit test.
Kralizek.AutoFixture.Extensions.MockHttp
An extension to AutoFixture to easily work with MockHttp.
Microsoft.Bot.Builder.Dialogs.Adaptive.Testing
Library for creating declarative test scripts for testing Bot Framework Adaptive Dialogs.
CoderPatros.MockHttpExtensions
This library is a small collection of extension methods for Richard Szalay's excellent MockHttp.

GitHub repositories (21)

Showing the top 5 popular GitHub repositories that depend on RichardSzalay.MockHttp:

Repository Stars
reactiveui/refit
The automatic type-safe REST library for .NET Core, Xamarin and .NET. Heavily inspired by Square's Retrofit library, Refit turns your REST API into a live interface.
Xabaril/AspNetCore.Diagnostics.HealthChecks
Enterprise HealthChecks for ASP.NET Core Diagnostics Package
Garderoben/MudBlazor
Blazor Component Library based on Material design. The goal is to do more with Blazor, utilizing CSS and keeping Javascript to a bare minimum.
Azure/azure-functions-core-tools
Command line tools for Azure Functions
microsoft/botbuilder-dotnet
Welcome to the Bot Framework SDK for .NET repository, which is the home for the libraries and packages that enable developers to build sophisticated bot applications using .NET.

Version History

Version Downloads Last updated
6.0.0 1,246,401 11/18/2019
5.0.0 1,314,889 6/18/2018
4.0.0 86,023 4/16/2018
3.3.0 123,810 3/11/2018
3.2.1 427,188 9/7/2017
3.2.0 19,437 8/31/2017
3.1.0 1,971 8/29/2017
1.5.1 16,192 8/22/2017
1.5.0 184,049 2/23/2017
1.4.1 10,343 1/19/2017
1.4.0 2,054 1/17/2017
1.3.1 75,449 9/19/2016
1.3.0 20,536 6/30/2016
1.3.0-netstandard-alpha2 3,492 5/19/2016
1.3.0-netstandard-alpha1 804 5/19/2016
1.2.2 66,611 3/1/2016
1.2.1 15,529 5/6/2015
1.2.0 9,682 12/22/2014
1.1.0 668 12/21/2014
1.0.1.79-pre 815 7/5/2016
1.0.1 2,883 6/28/2014
1.0.1-beta 637 6/23/2014
1.0.0-beta 657 6/22/2014