public class OkHttp3SyncImpl extends AbstractSyncHttp implements IOkhttp3
| Modifier and Type | Field and Description |
|---|---|
private okhttp3.OkHttpClient.Builder |
clientBuilder |
header, httpConfigFORM_DATA_UTF_8, JSON_UTF_8| Constructor and Description |
|---|
OkHttp3SyncImpl() |
OkHttp3SyncImpl(HttpConfig config) |
OkHttp3SyncImpl(okhttp3.OkHttpClient.Builder clientBuilder,
HttpConfig config) |
| Modifier and Type | Method and Description |
|---|---|
private SimpleHttpResponse |
exec(okhttp3.Request.Builder requestBuilder) |
SimpleHttpResponse |
get(String url)
get 请求
|
SimpleHttpResponse |
get(String url,
Map<String,String> params)
get 请求
|
SimpleHttpResponse |
post(String url)
post请求
|
SimpleHttpResponse |
post(String url,
Map<String,String> formdata)
post请求
|
SimpleHttpResponse |
post(String url,
Map<String,String> formData,
HttpHeader header)
post 请求
|
SimpleHttpResponse |
post(String url,
String data)
post请求
|
SimpleHttpResponse |
post(String url,
String dataJson,
HttpHeader header)
post请求
|
getHttpConfig, setHeader, setHttpConfigclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbuildClient, buildHttpUrl, getRequestBuilder, postFormDataRequestBuild, postJsonRequestBuildpublic OkHttp3SyncImpl()
public OkHttp3SyncImpl(HttpConfig config)
public OkHttp3SyncImpl(okhttp3.OkHttpClient.Builder clientBuilder,
HttpConfig config)
public SimpleHttpResponse get(String url)
SyncHttppublic SimpleHttpResponse get(String url, Map<String,String> params)
SyncHttppublic SimpleHttpResponse post(String url)
SyncHttppublic SimpleHttpResponse post(String url, String data)
SyncHttppublic SimpleHttpResponse post(String url, String dataJson, HttpHeader header)
SyncHttppublic SimpleHttpResponse post(String url, Map<String,String> formdata)
SyncHttppublic SimpleHttpResponse post(String url, Map<String,String> formData, HttpHeader header)
SyncHttpprivate SimpleHttpResponse exec(okhttp3.Request.Builder requestBuilder)
Copyright © 2022. All rights reserved.