public final class OkHttpTools extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
static okhttp3.MediaType |
JSON |
| 限定符和类型 | 方法和说明 |
|---|---|
okhttp3.Request |
buildPost(String url,
Map<String,String> params) |
<T> T |
execute(okhttp3.Request request,
Type type) |
<T> T |
get(String url,
Map<String,String> params,
Class<T> classOfT) |
<T> T |
get(String url,
Type type) |
static OkHttpTools |
getInstance() |
String |
post(String url,
String json) |
public static OkHttpTools getInstance()
public String post(String url, String json) throws IOException
IOExceptionpublic <T> T get(String url, Map<String,String> params, Class<T> classOfT) throws IOException
IOExceptionpublic <T> T get(String url, Type type) throws IOException
IOExceptionpublic <T> T execute(okhttp3.Request request,
Type type)
throws IOException
IOExceptionCopyright © 2019 dromara. All rights reserved.