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

Method string

HTTP method text, such as GET.

Url string

Formatted request URL, or null when the request has no URL. Configured query and path redaction has already been applied.

Headers IReadOnlyDictionary<string, string[]>

Captured header names and values, or null when header capture is disabled. Header names use case-insensitive comparison.

Body object

Captured 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

object

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

IReadOnlyDictionary<string, string[]>

Method

HTTP method text, such as GET.

public string Method { get; init; }

Property Value

string

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; }

Property Value

string