public final class RecordedRequest extends Object
Constructor and Description |
---|
RecordedRequest(String requestLine,
Headers headers,
List<Integer> chunkSizes,
long bodySize,
okio.Buffer body,
int sequenceNumber,
Socket socket) |
Modifier and Type | Method and Description |
---|---|
okio.Buffer |
getBody()
Returns the body of this POST request.
|
long |
getBodySize()
Returns the total size of the body of this POST request (before truncation).
|
List<Integer> |
getChunkSizes()
Returns the sizes of the chunks of this request's body, or an empty list if the request's body
was empty or unchunked.
|
Handshake |
getHandshake()
Returns the TLS handshake of the connection that carried this request, or null if the request
was received without TLS.
|
String |
getHeader(String name)
Returns the first header named
name , or null if no such header exists. |
Headers |
getHeaders()
Returns all headers.
|
String |
getMethod() |
String |
getPath() |
String |
getRequestLine() |
HttpUrl |
getRequestUrl() |
int |
getSequenceNumber()
Returns the index of this request on its HTTP connection.
|
TlsVersion |
getTlsVersion()
Returns the connection's TLS version or null if the connection doesn't use SSL.
|
String |
getUtf8Body()
Deprecated.
Use
getBody().readUtf8() . |
String |
toString() |
public HttpUrl getRequestUrl()
public String getRequestLine()
public String getMethod()
public String getPath()
public Headers getHeaders()
public String getHeader(String name)
name
, or null if no such header exists.public List<Integer> getChunkSizes()
public long getBodySize()
public okio.Buffer getBody()
public String getUtf8Body()
getBody().readUtf8()
.public int getSequenceNumber()
public TlsVersion getTlsVersion()
public Handshake getHandshake()
Copyright © 2019. All rights reserved.