|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectcom.github.sd4324530.fastweixin.api.BaseAPI
public abstract class BaseAPI
API基类,提供一些通用方法 包含自动刷新token、通用get post请求等
| 字段摘要 | |
|---|---|
protected static String |
BASE_API_URL
|
protected ApiConfig |
config
|
| 构造方法摘要 | |
|---|---|
protected |
BaseAPI(ApiConfig config)
构造方法,设置apiConfig |
| 方法摘要 | |
|---|---|
protected BaseResponse |
executeGet(String url)
通用get请求 |
protected BaseResponse |
executePost(String url,
String json)
通用post请求 |
protected BaseResponse |
executePost(String url,
String json,
File file)
通用post请求 |
protected boolean |
isSuccess(String errCode)
判断本次请求是否成功 |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 字段详细信息 |
|---|
protected static final String BASE_API_URL
protected final ApiConfig config
| 构造方法详细信息 |
|---|
protected BaseAPI(ApiConfig config)
config - 微信API配置对象| 方法详细信息 |
|---|
protected BaseResponse executePost(String url,
String json)
url - 地址,其中token用#代替json - 参数,json格式
protected BaseResponse executePost(String url,
String json,
File file)
url - 地址,其中token用#代替json - 参数,json格式file - 上传的文件
protected BaseResponse executeGet(String url)
url - 地址,其中token用#代替
protected boolean isSuccess(String errCode)
errCode - 错误码
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||