Class HttpExchangeRequestSnapshot
- Namespace
- XBullet.EasyTesting.Snapshots
- Assembly
- XBullet.EasyTesting.Snapshots.Core.dll
A stable representation of the request in an HTTP exchange.
public sealed record HttpExchangeRequestSnapshot : IEquatable<HttpExchangeRequestSnapshot>
- Inheritance
-
HttpExchangeRequestSnapshot
- Implements
- Inherited Members
Constructors
HttpExchangeRequestSnapshot(string, string?, IReadOnlyDictionary<string, string[]>?, object?)
A stable representation of the request in an HTTP exchange.
public HttpExchangeRequestSnapshot(string Method, string? Url, IReadOnlyDictionary<string, string[]>? Headers, object? Body)
Parameters
MethodstringHTTP method text, such as
GET.UrlstringFormatted request URL, or null when the request has no URL. Configured query and path redaction has already been applied.
HeadersIReadOnlyDictionary<string, string[]>Captured header names and values, or null when header capture is disabled. Header names use case-insensitive comparison.
BodyobjectCaptured JSON, text, or base64 binary body, or null when body capture is disabled or the body is absent or empty.
Properties
Body
Captured JSON, text, or base64 binary body, or null when body capture is disabled or the body is absent or empty.
public object? Body { get; init; }
Property Value
Headers
Captured header names and values, or null when header capture is disabled. Header names use case-insensitive comparison.
public IReadOnlyDictionary<string, string[]>? Headers { get; init; }
Property Value
Method
HTTP method text, such as GET.
public string Method { get; init; }
Property Value
Url
Formatted request URL, or null when the request has no URL. Configured query and path redaction has already been applied.
public string? Url { get; init; }