public abstract class AbstractISSRequest<T> extends Object implements ISSRequest<T>
| Modifier and Type | Field and Description |
|---|---|
static String |
API_URL |
protected Consumer<T> |
callback |
protected Class<T> |
callbackType |
protected String |
endpoint |
protected static com.google.gson.Gson |
GSON |
| Constructor and Description |
|---|
AbstractISSRequest() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
getBody(okhttp3.Response response) |
String |
getEndpoint() |
protected okhttp3.Request |
getRequest() |
protected void |
handleResponse(okhttp3.Response response) |
void |
perform() |
public static String API_URL
protected static final com.google.gson.Gson GSON
protected final String endpoint
protected okhttp3.Request getRequest()
protected String getBody(okhttp3.Response response) throws IOException
IOExceptionpublic String getEndpoint()
getEndpoint in interface ISSRequest<T>protected void handleResponse(okhttp3.Response response)
throws IOException
IOExceptionpublic void perform()
perform in interface ISSRequest<T>Copyright © 2017. All rights reserved.