KeelMatrix.HookReplay 0.1.1

Prefix Reserved
dotnet add package KeelMatrix.HookReplay --version 0.1.1
                    
NuGet\Install-Package KeelMatrix.HookReplay -Version 0.1.1
                    
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="KeelMatrix.HookReplay" Version="0.1.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="KeelMatrix.HookReplay" Version="0.1.1" />
                    
Directory.Packages.props
<PackageReference Include="KeelMatrix.HookReplay" />
                    
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 KeelMatrix.HookReplay --version 0.1.1
                    
#r "nuget: KeelMatrix.HookReplay, 0.1.1"
                    
#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 KeelMatrix.HookReplay@0.1.1
                    
#: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=KeelMatrix.HookReplay&version=0.1.1
                    
Install as a Cake Addin
#tool nuget:?package=KeelMatrix.HookReplay&version=0.1.1
                    
Install as a Cake Tool

KeelMatrix.HookReplay

Record an intentional HttpClient exchange once, then replay it deterministically in tests and CI without any network fallback. HookReplay stores sanitized, versioned cassettes that are safe to review and commit.

Install

dotnet add package KeelMatrix.HookReplay --version 0.1.1

Quick Start

Record one interaction while the test server is available:

using KeelMatrix.HookReplay;

var recordOptions = new HookReplayOptions("cassettes/greeting.json")
{
    Mode = HookReplayMode.Record
};

using (var recorder = HookReplayClient.Create(recordOptions))
using (HttpResponseMessage recorded = await recorder.GetAsync("https://api.example.test/greeting"))
{
    Console.WriteLine(await recorded.Content.ReadAsStringAsync());
}

Stop the server or otherwise remove network access, then replay the same request offline:

var replayOptions = new HookReplayOptions("cassettes/greeting.json")
{
    Mode = HookReplayMode.Replay
};

using var replay = HookReplayClient.Create(replayOptions);
using HttpResponseMessage response =
    await replay.GetAsync("https://api.example.test/greeting");

Replay never falls back to the network. A cassette miss throws HookReplayMismatchException, even when an inner handler is configured.

Important Limitations

  • Supported target frameworks are net8.0 and netstandard2.0.
  • Empty, text, JSON, and application/x-www-form-urlencoded bodies are supported. Streaming, multipart, and arbitrary binary content are not.
  • Request and response bodies are bounded to 1 MiB by default. Set HookReplayOptions.MaxBodyBytes to a lower or higher bounded value when appropriate. A complete cassette is limited to 32 MiB.
  • Repeated identical requests consume matching recorded interactions sequentially. Concurrent indistinguishable requests are not deterministically orderable; use a selected matching header or custom matcher when they must be distinguished.

Documentation

The repository README covers the broader product workflow. See the cassette compatibility policy, security policy, privacy policy, and contributing guide for canonical details.

License

MIT © KeelMatrix

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.1 99 9/23/2026
0.1.0 115 9/15/2026