Skip to main content
net10.0net11.0

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.

Published
Nov 14, 2026
9d ago
Total Downloads
4.7K
4,748

Install

dotnet add package Nullean.Snapshots.Http --version 0.12.2
ProductVersions
.NET
net10.0net11.0

README

Nullean.Snapshots.Http

snapshots.

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.

NuGet

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.Shape keeps only the shape, ReadOnly = true sends no writes, and Variant keeps one verified file per environment.
  • In AwesomeAssertions tests use Nullean.Snapshots.Http.Assertions; from the command line, snap http run and snap http compare. Parsing and running .http files is Nullean.HttpFileParser.

Learn more

Changes from Previous Version

v0.12.1v0.12.2
Added Frameworks
net11.0
Added Dependencies

Adoption Assessment

Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.

Compatibility metadata lists 2 target frameworks; confirm the exact target used by your application.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.