public final class RecordedRequest
extends java.lang.Object
| Constructor | Description |
|---|---|
RecordedRequest(java.lang.String requestLine,
okhttp3.Headers headers,
java.util.List<java.lang.Integer> chunkSizes,
long bodySize,
okio.Buffer body,
int sequenceNumber,
java.net.Socket socket) |
| Modifier and Type | Method | 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).
|
java.util.List<java.lang.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.
|
okhttp3.Handshake |
getHandshake() |
Returns the TLS handshake of the connection that carried this request, or null if the request
was received without TLS.
|
java.lang.String |
getHeader(java.lang.String name) |
Returns the first header named
name, or null if no such header exists. |
okhttp3.Headers |
getHeaders() |
Returns all headers.
|
java.lang.String |
getMethod() |
|
java.lang.String |
getPath() |
|
java.lang.String |
getRequestLine() |
|
okhttp3.HttpUrl |
getRequestUrl() |
|
int |
getSequenceNumber() |
Returns the index of this request on its HTTP connection.
|
okhttp3.TlsVersion |
getTlsVersion() |
Returns the connection's TLS version or null if the connection doesn't use SSL.
|
java.lang.String |
getUtf8Body() |
Deprecated.
Use
getBody().readUtf8(). |
java.lang.String |
toString() |
public RecordedRequest(java.lang.String requestLine,
okhttp3.Headers headers,
java.util.List<java.lang.Integer> chunkSizes,
long bodySize,
okio.Buffer body,
int sequenceNumber,
java.net.Socket socket)
public okhttp3.HttpUrl getRequestUrl()
public java.lang.String getRequestLine()
public java.lang.String getMethod()
public java.lang.String getPath()
public okhttp3.Headers getHeaders()
public java.lang.String getHeader(java.lang.String name)
name, or null if no such header exists.public java.util.List<java.lang.Integer> getChunkSizes()
public long getBodySize()
public okio.Buffer getBody()
public java.lang.String getUtf8Body()
getBody().readUtf8().public int getSequenceNumber()
public okhttp3.TlsVersion getTlsVersion()
public okhttp3.Handshake getHandshake()
public java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2020. All rights reserved.