public class Get extends Object
| 构造器和说明 |
|---|
Get() |
| 限定符和类型 | 方法和说明 |
|---|---|
static HttpResponse |
doGet(@NotNull String url)
执行http get请求
|
static HttpResponse |
doGet(@NotNull String url,
@Nullable okhttp3.Headers headers)
执行http get请求
|
static HttpResponse |
doGet(@NotNull String url,
@Nullable okhttp3.Headers headers,
@Nullable ClientConfig clientConfig)
执行http get请求
|
static void |
doGetAsync(@NotNull String url,
@Nullable okhttp3.Headers headers,
@Nullable ClientConfig clientConfig,
@NotNull okhttp3.Callback callback)
执行异步http get请求 (okhttp3 原生异步)
|
static void |
doGetAsync(@NotNull String url,
@Nullable okhttp3.Headers headers,
@Nullable ClientConfig clientConfig,
@NotNull HttpCallback httpCallback)
执行异步http get请求
|
static void |
doGetAsync(@NotNull String url,
@Nullable okhttp3.Headers headers,
@NotNull HttpCallback httpCallback)
执行异步http get请求
|
static void |
doGetAsync(@NotNull String url,
@NotNull HttpCallback httpCallback)
执行异步http get请求
|
public static HttpResponse doGet(@NotNull @NotNull String url) throws IOException
url - 请求地址IOExceptionpublic static HttpResponse doGet(@NotNull @NotNull String url, @Nullable @Nullable okhttp3.Headers headers) throws IOException
url - 请求地址headers - 请求头IOExceptionpublic static HttpResponse doGet(@NotNull @NotNull String url, @Nullable @Nullable okhttp3.Headers headers, @Nullable @Nullable ClientConfig clientConfig) throws IOException
url - 请求地址headers - 请求头clientConfig - client配置IOExceptionpublic static void doGetAsync(@NotNull
@NotNull String url,
@NotNull
@NotNull HttpCallback httpCallback)
url - 请求地址httpCallback - callback类public static void doGetAsync(@NotNull
@NotNull String url,
@Nullable
@Nullable okhttp3.Headers headers,
@NotNull
@NotNull HttpCallback httpCallback)
url - 请求地址headers - 请求头httpCallback - callback类public static void doGetAsync(@NotNull
@NotNull String url,
@Nullable
@Nullable okhttp3.Headers headers,
@Nullable
@Nullable ClientConfig clientConfig,
@NotNull
@NotNull HttpCallback httpCallback)
url - 请求地址headers - 请求头clientConfig - client配置httpCallback - callback类public static void doGetAsync(@NotNull
@NotNull String url,
@Nullable
@Nullable okhttp3.Headers headers,
@Nullable
@Nullable ClientConfig clientConfig,
@NotNull
@NotNull okhttp3.Callback callback)
url - 请求地址headers - 请求头clientConfig - client配置callback - callback类Copyright © 2020. All rights reserved.