D - 请求执行参数T - 响应public abstract class AbstractApiRequest<D,T extends ApiResponse> extends Object implements ApiRequest<D,T>
| 限定符和类型 | 字段和说明 |
|---|---|
protected ApiRequestConfig |
config |
protected Map<String,String> |
headers |
protected Class<T> |
tCls |
| 限定符 | 构造器和说明 |
|---|---|
protected |
AbstractApiRequest() |
| 限定符和类型 | 方法和说明 |
|---|---|
protected void |
after(String url,
String body,
String response) |
protected abstract T |
analysis(String response) |
protected String |
apiValue(String value) |
protected void |
before(String url,
String body) |
protected String |
body(Map<String,Object> dataMap) |
protected Charset |
charset() |
T |
execute(D data) |
protected ApiRequestConfig |
getConfig() |
protected boolean |
ignoreField(Field field) |
protected void |
init(D data,
Map<String,Object> dataMap) |
protected Tuple2<Boolean,String> |
nameFilter(String name,
Object value) |
protected String |
read(InputStream is) |
protected SSLContext |
sslContext() |
protected String |
url(Map<String,Object> dataMap) |
protected Tuple2<Boolean,Object> |
valueFilter(String name,
Object value) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitexecuteprotected final Class<T extends ApiResponse> tCls
protected final ApiRequestConfig config
protected ApiRequestConfig getConfig()
public final T execute(D data)
execute 在接口中 ApiRequest<D,T extends ApiResponse>protected boolean ignoreField(Field field)
protected SSLContext sslContext()
protected Charset charset()
protected String read(InputStream is)
Copyright © 2022. All rights reserved.