Class InterceptedFlow

Namespace
Kuestenlogik.Bowire.Interceptor
Assembly
Kuestenlogik.Bowire.Interceptor.dll

One request/response pair observed by Kuestenlogik.Bowire.Interceptor.BowireInterceptorMiddleware as it sat between the host's routing and endpoint stages. Shape mirrors CapturedFlow on purpose — the workbench "Intercepted" rail reuses the same detail-pane renderer as the standalone proxy's "Proxy" rail. Only the trigger differs: this surface is filled by every request the host receives, not by a CONNECT-tunnelled MITM session.

public sealed class InterceptedFlow
Inheritance
InterceptedFlow
Inherited Members

Remarks

The interceptor never modifies the request or response in Phase A — it sees the bytes flowing through the pipeline and records them. Mutation + short-circuit hooks are Phase B / D work and will mount into the same flow shape so the rail surface stays stable across the rollout.

Streaming-style endpoints (SSE / chunked / WebSocket upgrade) are detected by the middleware and recorded with empty bodies — the Streaming flag tells the UI to label them as such instead of pretending an empty body is an actual empty payload.

Constructors

InterceptedFlow()

public InterceptedFlow()

Properties

CapturedAt

Wall-clock timestamp the request entered the middleware.

public DateTimeOffset CapturedAt { get; init; }

Property Value

DateTimeOffset

Error

Error message when the downstream pipeline threw. Null on the happy path.

public string? Error { get; init; }

Property Value

string

Id

Stable id assigned at capture-time (monotonic per process).

public long Id { get; init; }

Property Value

long

LatencyMs

End-to-end latency in milliseconds — wall-clock from middleware entry to endpoint completion.

public int LatencyMs { get; init; }

Property Value

int

Method

HTTP verb (GET / POST / …) as the host received it.

public string Method { get; init; }

Property Value

string

MockRuleId

Phase D (#308): id of the InterceptorMockRule that served the response, when Mocked is set. Null on a normal pass-through flow.

public string? MockRuleId { get; init; }

Property Value

string

Mocked

Phase D (#308): set when an InterceptorMockStore rule served the response instead of the host's endpoint. The rail labels the row with a "mocked" badge so the operator can see at a glance which flows came from upstream vs. a mock-injection rule.

public bool Mocked { get; init; }

Property Value

bool

Path

Path-only view (no scheme / authority) for the sidebar's space-constrained list rendering. The full Url stays available for the detail pane.

public string Path { get; init; }

Property Value

string

RequestBody

Request body bytes — kept as UTF-8 text when possible, base64 in RequestBodyBase64 when binary.

public string? RequestBody { get; init; }

Property Value

string

RequestBodyBase64

Base64 of the request body when it wasn't safe UTF-8.

public string? RequestBodyBase64 { get; init; }

Property Value

string

RequestBodyTruncated

Set when the request body exceeded the configured capture cap (MaxBodyBytes). The bytes up to the cap are still recorded in RequestBody / RequestBodyBase64; this flag tells the UI to surface a "truncated" badge.

public bool RequestBodyTruncated { get; init; }

Property Value

bool

RequestHeaders

Request headers as captured (case-preserved).

public IReadOnlyList<KeyValuePair<string, string>> RequestHeaders { get; init; }

Property Value

IReadOnlyList<KeyValuePair<string, string>>

ResponseBody

Response body (UTF-8 or null when ResponseBodyBase64 is set).

public string? ResponseBody { get; init; }

Property Value

string

ResponseBodyBase64

Base64 of the response body when it wasn't safe UTF-8.

public string? ResponseBodyBase64 { get; init; }

Property Value

string

ResponseBodyTruncated

Set when the response body exceeded the configured capture cap.

public bool ResponseBodyTruncated { get; init; }

Property Value

bool

ResponseHeaders

Response headers as the host wrote them (case-preserved).

public IReadOnlyList<KeyValuePair<string, string>> ResponseHeaders { get; init; }

Property Value

IReadOnlyList<KeyValuePair<string, string>>

ResponseStatus

HTTP status code the endpoint emitted. 0 when the endpoint threw before writing one.

public int ResponseStatus { get; init; }

Property Value

int

Scheme

Scheme (http or https) the request arrived on.

public string Scheme { get; init; }

Property Value

string

Streaming

Set when the middleware detected a streaming response (SSE, chunked transfer, WebSocket upgrade). The body fields stay empty — the workbench renders a "streaming" placeholder instead of an empty payload.

public bool Streaming { get; init; }

Property Value

bool

Url

Absolute URL the host received the request at — scheme + host + path + query, reassembled from HttpRequest.Scheme / Host / Path / QueryString.

public string Url { get; init; }

Property Value

string