Class RestResponseData

Namespace
ProtoTest.Rest
Assembly
ProtoTest.Rest.dll

Data payload sent when an HTTP request/response is recorded.

public sealed record RestResponseData : IEquatable<RestResponseData>
Inheritance
RestResponseData
Implements
Inherited Members
Extension Methods

Constructors

RestResponseData(string, string, int, string, IReadOnlyDictionary<string, string>, string?, TimeSpan?)

Data payload sent when an HTTP request/response is recorded.

public RestResponseData(string Method, string RouteTemplate, int StatusCode, string ResponseBody, IReadOnlyDictionary<string, string> Headers, string? RequestUri = null, TimeSpan? Duration = null)

Parameters

Method string
RouteTemplate string
StatusCode int
ResponseBody string
Headers IReadOnlyDictionary<string, string>
RequestUri string
Duration TimeSpan?

Properties

Duration

public TimeSpan? Duration { get; init; }

Property Value

TimeSpan?

Headers

public IReadOnlyDictionary<string, string> Headers { get; init; }

Property Value

IReadOnlyDictionary<string, string>

Method

public string Method { get; init; }

Property Value

string

RequestUri

public string? RequestUri { get; init; }

Property Value

string

ResponseBody

public string ResponseBody { get; init; }

Property Value

string

RouteTemplate

public string RouteTemplate { get; init; }

Property Value

string

StatusCode

public int StatusCode { get; init; }

Property Value

int