Class StubHttpExchange

Namespace
XBullet.EasyTesting.Http
Assembly
XBullet.EasyTesting.Http.dll

A captured outbound HTTP request and its response or failure.

public sealed class StubHttpExchange
Inheritance
StubHttpExchange
Inherited Members
Extension Methods

Properties

Failure

Gets the failure raised before a response was produced.

public StubHttpFailure? Failure { get; }

Property Value

StubHttpFailure

A stable failure description when matching, delay, or response creation failed; otherwise, null. Failures raised while consuming response content appear on BodyFailure instead.

Request

Gets the captured request.

public StubHttpRequest Request { get; }

Property Value

StubHttpRequest

The handler-owned request snapshot for this exchange. Callers must not mutate its nested header values. Raw values are not redacted.

Response

Gets the response returned by the stub, when one was produced.

public StubHttpResponse? Response { get; }

Property Value

StubHttpResponse

The latest immutable response snapshot, or null before a response is produced or when request processing fails. Query this property again after consuming content to observe captured body bytes or a body-read failure.