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.
Get Started
| Product | Versions |
|---|---|
| .NET |
README
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
Downloads by Version
Similar & Alternative Packages
Hand-picked matching NuGet libraries based on tags & ecosystem
Depended On By
Find packages that declare this package as a dependency. NuGet does not provide a reverse-dependency endpoint, so candidates are checked on demand.
Adoption Assessment
Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.
Related Guides & Workflows
Learn how to evaluate, integrate, or audit this package in your .NET project.