public class HutoolSyncImpl extends AbstractSyncHttp implements IHutoolHttp
header, httpConfig| Constructor and Description |
|---|
HutoolSyncImpl() |
HutoolSyncImpl(HttpConfig httpConfig) |
| Modifier and Type | Method and Description |
|---|---|
private SimpleHttpResponse |
exec(cn.hutool.http.HttpRequest request) |
SimpleHttpResponse |
get(String url)
get 请求
|
SimpleHttpResponse |
get(String url,
Map<String,String> params)
get 请求
|
private String |
getContentType(String defaultContentType) |
private cn.hutool.http.HttpRequest |
getRequest(cn.hutool.core.net.url.UrlBuilder url,
cn.hutool.http.Method method) |
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 dataJson)
post请求
|
SimpleHttpResponse |
post(String url,
String dataJson,
HttpHeader header)
post请求
|
getHttpConfig, setHeader, setHttpConfigclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetHttpRequest, urlBuilderpublic HutoolSyncImpl()
public HutoolSyncImpl(HttpConfig httpConfig)
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 dataJson)
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(cn.hutool.http.HttpRequest request)
private cn.hutool.http.HttpRequest getRequest(cn.hutool.core.net.url.UrlBuilder url,
cn.hutool.http.Method method)
Copyright © 2022. All rights reserved.