HttpRecordingEntry Class

Represents a recorded HTTP request/response pair.

public sealed class HttpRecordingEntry

Constructors

NameDescription
HttpRecordingEntry()

HttpRecordingEntry()

  • Obsolete: Constructors of types with required members are not supported in this version of your compiler.
[Obsolete("Constructors of types with required members are not supported in this version of your compiler.", true)]
public HttpRecordingEntry()

No documentation is available.

Properties

NameDescription
HttpVersionGets or sets the HTTP version of the response (e.g., 1.1, 2.0). When null, the default version is used on replay.
MethodGets or sets the HTTP method (e.g., GET, POST).
ReasonPhraseGets or sets the reason phrase returned with the status code, when the server sent one.
RecordedAtGets or sets the timestamp when this entry was recorded.
RequestBodyGets or sets the request body.
RequestHeadersGets or sets the request headers.
RequestUriGets or sets the absolute request URI.
ResponseBodyGets or sets the response body.
ResponseHeadersGets or sets the response headers.
StatusCodeGets or sets the HTTP status code.

Gets or sets the HTTP version of the response (e.g., 1.1, 2.0). When null, the default version is used on replay.

public string? HttpVersion { get; set; }

Property value

string?

Gets or sets the HTTP method (e.g., GET, POST).

public required string Method { get; set; }

Property value

string

Gets or sets the reason phrase returned with the status code, when the server sent one.

public string? ReasonPhrase { get; set; }

Property value

string?

Gets or sets the timestamp when this entry was recorded.

public DateTimeOffset RecordedAt { get; set; }

Property value

DateTimeOffset

Gets or sets the request body.

public byte[]? RequestBody { get; set; }

Property value

byte[]?

RequestHeaders

HttpRecordingEntry.cs

Gets or sets the request headers.

public Dictionary<string, string[]>? RequestHeaders { get; set; }

Gets or sets the absolute request URI.

public required string RequestUri { get; set; }

Property value

string

Gets or sets the response body.

public byte[]? ResponseBody { get; set; }

Property value

byte[]?

ResponseHeaders

HttpRecordingEntry.cs

Gets or sets the response headers.

public Dictionary<string, string[]>? ResponseHeaders { get; set; }

Gets or sets the HTTP status code.

public required int StatusCode { get; set; }

Property value

int