| 程序包 | 说明 |
|---|---|
| cn.aghost.http.client | |
| cn.aghost.http.client.utils |
| 限定符和类型 | 方法和说明 |
|---|---|
static HttpResponse |
Delete.doDelete(String url,
okhttp3.Headers headers,
byte[] body,
okhttp3.MediaType contentType,
ClientConfig clientConfig)
delete同步请求
|
static void |
Delete.doDeleteAsync(String url,
okhttp3.Headers headers,
byte[] body,
okhttp3.MediaType contentType,
ClientConfig clientConfig,
okhttp3.Callback callback)
delete异步请求(okhttp3 原生异步)
|
static void |
Delete.doDeleteAsync(String url,
okhttp3.Headers headers,
byte[] body,
okhttp3.MediaType contentType,
ClientConfig clientConfig,
HttpCallback httpCallback)
delete异步请求
|
static HttpResponse |
Get.doGet(String url,
okhttp3.Headers headers,
ClientConfig clientConfig)
执行http get请求
|
static void |
Get.doGetAsync(String url,
okhttp3.Headers headers,
ClientConfig clientConfig,
okhttp3.Callback callback)
执行异步http get请求 (okhttp3 原生异步)
|
static void |
Get.doGetAsync(String url,
okhttp3.Headers headers,
ClientConfig clientConfig,
HttpCallback httpCallback)
执行异步http get请求
|
static HttpResponse |
Post.doPost(String url,
okhttp3.Headers headers,
byte[] body,
okhttp3.MediaType contentType,
ClientConfig clientConfig)
post同步请求
|
static void |
Post.doPostAsync(String url,
okhttp3.Headers headers,
byte[] body,
okhttp3.MediaType contentType,
ClientConfig clientConfig,
okhttp3.Callback callback)
post异步请求(okhttp3 原生异步)
|
static void |
Post.doPostAsync(String url,
okhttp3.Headers headers,
byte[] body,
okhttp3.MediaType contentType,
ClientConfig clientConfig,
HttpCallback httpCallback)
post异步请求
|
static HttpResponse |
Put.doPut(String url,
okhttp3.Headers headers,
byte[] body,
okhttp3.MediaType contentType,
ClientConfig clientConfig)
put同步请求
|
static void |
Put.doPutAsync(String url,
okhttp3.Headers headers,
byte[] body,
okhttp3.MediaType contentType,
ClientConfig clientConfig,
okhttp3.Callback callback)
put异步请求(okhttp3 原生异步)
|
static void |
Put.doPutAsync(String url,
okhttp3.Headers headers,
byte[] body,
okhttp3.MediaType contentType,
ClientConfig clientConfig,
HttpCallback httpCallback)
put异步请求
|
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
HttpClientUtil.buildClientName(ClientConfig clientConfig)
根据连接配置构造连接名
|
static void |
HttpClientUtil.createClient(String clientName,
ClientConfig clientConfig)
创建client
|
static HttpResponse |
BaseHttpExecutor.executeWithBody(String method,
String url,
okhttp3.Headers headers,
byte[] body,
okhttp3.MediaType contentType,
ClientConfig clientConfig)
执行同步请求
|
static void |
BaseHttpExecutor.executeWithBodyAsync(String method,
String url,
okhttp3.Headers headers,
byte[] body,
okhttp3.MediaType contentType,
ClientConfig clientConfig,
okhttp3.Callback callback)
执行异步请求
|
static void |
BaseHttpExecutor.executeWithBodyAsync(String method,
String url,
okhttp3.Headers headers,
byte[] body,
okhttp3.MediaType contentType,
ClientConfig clientConfig,
HttpCallback httpCallback)
执行异步请求
|
static okhttp3.OkHttpClient |
HttpClientUtil.getClient(ClientConfig clientConfig)
根据config获取连接
|
static okhttp3.OkHttpClient |
HttpClientUtil.getClient(String clientName,
ClientConfig clientConfig)
根据名字获取client,若不存在就创建
|
Copyright © 2020. All rights reserved.