public class HutoolSyncImpl extends AbstractSyncHttp implements IHutoolHttp
header, httpConfig| Constructor and Description |
|---|
HutoolSyncImpl() |
HutoolSyncImpl(HttpConfig httpConfig) |
| Modifier and Type | Method and Description |
|---|---|
String |
get(String url)
get 请求
|
String |
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) |
String |
post(String url)
post请求
|
String |
post(String url,
Map<String,String> formdata)
post请求
|
String |
post(String url,
String dataJson)
post请求
|
InputStream |
postStream(String url,
String dataJson)
post请求
|
getHttpConfig, setHeader, setHttpConfigclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetHttpRequest, urlBuilderpublic HutoolSyncImpl()
public HutoolSyncImpl(HttpConfig httpConfig)
public String get(String url, Map<String,String> params)
SyncHttppublic String post(String url, String dataJson)
SyncHttppublic InputStream postStream(String url, String dataJson)
SyncHttppostStream in interface SyncHttpurl - 请求地址dataJson - 请求参数,json格式public String post(String url, Map<String,String> formdata)
SyncHttpprivate cn.hutool.http.HttpRequest getRequest(cn.hutool.core.net.url.UrlBuilder url,
cn.hutool.http.Method method)
Copyright © 2022. All rights reserved.