CapturedResponse
A response as a capture adapter reports it through NetworkCaptureSink.completeRequest.
Built with Builder, never constructed directly, so a field added in a later release arrives as one more optional builder call: an adapter written against an earlier release keeps compiling and linking, and reports that field as unknown. Immutable, and deliberately not a data class.
Types
Builds a CapturedResponse with statusCode and durationMs. Unless set, it has no headers, no body, no protocol, no final URL, and no prior responses, and is complete and not mocked.
Properties
The captured body with its truncation flag and byte size, or null when none was captured.
Milliseconds from the start of the request to this report.
true for a finished response. false for an in-flight progressive update: an event stream reports one when its headers arrive and on each read, then a complete response at EOF or close.
The id of the mock rule that produced the response, or null when it isn't mocked or the adapter didn't say which rule.
The responses the client answered with another request before this one, oldest first: the redirects it followed and the authentication challenges it answered. Empty when there were none, or when the adapter can't see them, as platform HttpURLConnection capture can't.
The HTTP status code.