RecordedRequest
An HTTP request that came into the mock web server.
Properties
The body of this request, or null if it has none. This may be truncated.
The sizes of the chunks of this request's body, or null if the request's body was not encoded with chunked encoding.
The index of the socket connection that carried this request. If two recorded requests share a connection index, they also shared a socket connection.
The index of this exchange on its HTTP connection. A request is uniquely identified by the (connection index, exchange index) pair.
The failure MockWebServer recorded when attempting to decode this request. If, for example, the inbound request was truncated, this exception will be non-null.
Returns the name of the server the client requested via the SNI (Server Name Indication) attribute in the TLS handshake. Unlike the rest of the HTTP exchange, this name is sent in cleartext and may be monitored or blocked by a proxy or other middlebox.