public class OkHttpEngineResponse extends java.lang.Object implements EngineResponse
| Constructor and Description |
|---|
OkHttpEngineResponse(EngineRequest request,
okhttp3.Response response,
@Nullable RequestListener listener) |
| Modifier and Type | Method and Description |
|---|---|
@Nullable WebBody |
body()
Gets the response body for the request if present.
|
void |
close() |
HeaderList |
headers()
Gets all the headers received for the request.
|
java.lang.String |
message()
Gets the returned status message for the request.
|
EngineRequest |
request()
The executed
EngineRequest of this response. |
int |
statusCode()
Gets the returned status code for the request.
|
public OkHttpEngineResponse(EngineRequest request, okhttp3.Response response, @Nullable @Nullable RequestListener listener)
public EngineRequest request()
EngineResponseEngineRequest of this response.request in interface EngineResponsepublic int statusCode()
EngineResponsestatusCode in interface EngineResponsepublic java.lang.String message()
EngineResponsemessage in interface EngineResponsepublic HeaderList headers()
EngineResponseheaders in interface EngineResponse@Nullable public @Nullable WebBody body()
EngineResponsebody in interface EngineResponsepublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablejava.io.IOException