T - The type of the requested response which would be serialized out of the API call.public class Request<T> extends HttpRequest
for examples.| Modifier | Constructor and Description |
|---|---|
protected |
Request(MethodType t,
String endPoint,
boolean requiresToken) |
| Modifier and Type | Method and Description |
|---|---|
Request<T> |
addParams(Map<String,Object> params) |
Request<T> |
addParams(Object... params) |
static <F> Request<F> |
createRequest(MethodType get,
String endpoint) |
static <F> Request<F> |
createRequest(MethodType get,
String endpoint,
boolean requiresToken) |
static <F> Request<F> |
createRequest(MethodType get,
String endpoint,
boolean requiresToken,
String userToken) |
Request<T> |
expects(String returnKey,
Class<?> response) |
<F> Request<T> |
expects(String returnKey,
TypeReference<F> type) |
Map<String,Object> |
getExpected() |
RestResponse<T> |
getResponse() |
boolean |
isRequiresToken() |
void |
setResponse(RestResponse<T> response) |
createHttpRequest, getEndPoint, getMethod, getRequestParamsprotected Request(MethodType t, String endPoint, boolean requiresToken)
public static <F> Request<F> createRequest(MethodType get, String endpoint)
public static <F> Request<F> createRequest(MethodType get, String endpoint, boolean requiresToken)
public static <F> Request<F> createRequest(MethodType get, String endpoint, boolean requiresToken, String userToken)
public Request<T> addParams(Map<String,Object> params)
addParams in class HttpRequestpublic Request<T> addParams(Object... params)
addParams in class HttpRequestpublic <F> Request<T> expects(String returnKey, TypeReference<F> type)
public RestResponse<T> getResponse()
public void setResponse(RestResponse<T> response)
public boolean isRequiresToken()
Copyright © 2018 Empyr, Inc.. All rights reserved.