public class ApiResponse<T> extends Object
| Constructor and Description |
|---|
ApiResponse(okhttp3.Request request,
int statusCode,
Map<String,List<String>> headers,
T data,
long roundTripTime)
Constructor for ApiResponse.
|
| Modifier and Type | Method and Description |
|---|---|
okhttp3.Request |
getRequest()
Get the
request. |
T |
getResponseBody()
Get the
data. |
Map<String,List<String>> |
getResponseHeaders()
Get the
headers. |
long |
getRoundTripTime()
Get the
roundTripTime. |
int |
getStatusCode()
Get the
status code. |
public ApiResponse(okhttp3.Request request,
int statusCode,
Map<String,List<String>> headers,
T data,
long roundTripTime)
Constructor for ApiResponse.
statusCode - The status code of HTTP responseheaders - The headers of HTTP responsedata - The object deserialized from response bodpublic int getStatusCode()
Get the status code.
public Map<String,List<String>> getResponseHeaders()
Get the headers.
Map of headerspublic T getResponseBody()
Get the data.
public okhttp3.Request getRequest()
Get the request.
public long getRoundTripTime()
Get the roundTripTime.
Copyright © 2023. All rights reserved.