Nullean.Snapshots.Http
0.12.1
dotnet add package Nullean.Snapshots.Http --version 0.12.1
NuGet\Install-Package Nullean.Snapshots.Http -Version 0.12.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="Nullean.Snapshots.Http" Version="0.12.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Nullean.Snapshots.Http" Version="0.12.1" />
<PackageReference Include="Nullean.Snapshots.Http" />
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 Nullean.Snapshots.Http --version 0.12.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Nullean.Snapshots.Http, 0.12.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 Nullean.Snapshots.Http@0.12.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=Nullean.Snapshots.Http&version=0.12.1
#tool nuget:?package=Nullean.Snapshots.Http&version=0.12.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Nullean.Snapshots.Http

HTTP snapshots for Nullean.Snapshots: snapshot an HttpResponseMessage, or run a .http file and compare every response, status, chosen headers and JSON bodies as trees, with secrets redacted.
Install
dotnet add package Nullean.Snapshots.Http
Quick start
Run a .http file and compare it with its verified file, without a test framework:
using Nullean.Snapshots.Http;
public static class OrdersCheck
{
public static async Task CheckAsync(HttpClient client)
{
var options = new HttpFileSnapshotOptions { Client = client, Environment = "test" };
var transcript = await HttpFileSnapshot.RunAsync("http/orders.http", options);
var result = HttpFileSnapshot.Match(transcript); // .snapshots/http/orders.verified.responses
if (!result.Passed)
throw new InvalidOperationException(result.FailureMessage);
}
}
HttpSnapshot.RenderAsync(response, new HttpSnapshotOptions { Headers = ["x-request-id"] })renders one response.- A live service:
Transcript = TranscriptMode.Shapekeeps only the shape,ReadOnly = truesends no writes, andVariantkeeps one verified file per environment. - In AwesomeAssertions tests use
Nullean.Snapshots.Http.Assertions; from the command line,snap http runandsnap http compare. Parsing and running.httpfiles isNullean.HttpFileParser.
Learn more
- Documentation: https://snapshots.nullean.net
- HTTP snapshots: https://snapshots.nullean.net/formats/http/
- Expected differences: https://snapshots.nullean.net/workflow/expected-differences/
- Source and issues: https://github.com/nullean/snapshots
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- Nullean.HttpFileParser (>= 0.12.1)
- Nullean.Snapshots (>= 0.12.1)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Nullean.Snapshots.Http:
| Package | Downloads |
|---|---|
|
Nullean.Snapshots.Http.Assertions
AwesomeAssertions extensions for Nullean.Snapshots.Http: MatchHttpSnapshot, MatchHttpFileSnapshot and HttpFileTest. |
GitHub repositories
This package is not used by any popular GitHub repositories.