@Service public class HttpClientServiceImpl extends Object implements HttpClientService
| 限定符和类型 | 字段和说明 |
|---|---|
protected static org.slf4j.Logger |
LOGGER |
| 构造器和说明 |
|---|
HttpClientServiceImpl() |
| 限定符和类型 | 方法和说明 |
|---|---|
String |
doGet(org.apache.http.client.methods.HttpGet httpGet) |
byte[] |
doGet(String url) |
InputStream |
doGetReturnStream(String url)
liyinqiao 返回InputStream
|
String |
doPost(org.apache.http.client.methods.HttpPost httpPost,
String charset) |
byte[] |
doPost(String url,
List<org.apache.http.NameValuePair> postParams) |
byte[] |
doPost(String url,
List<org.apache.http.NameValuePair> postParams,
String charset)
liyinqiao 比上面方法多一个 设置字符集 短信接口接口字符集要求是 GBK
|
String |
sendRequest(org.apache.http.client.methods.HttpEntityEnclosingRequestBase httpEntityEnclosingRequestBase,
String charset) |
public byte[] doGet(String url) throws IOException
doGet 在接口中 HttpClientServiceurl - 请求url地址IOExceptionpublic String doGet(org.apache.http.client.methods.HttpGet httpGet) throws IOException
doGet 在接口中 HttpClientServicehttpGet - IOExceptionpublic String doPost(org.apache.http.client.methods.HttpPost httpPost, String charset) throws IOException
doPost 在接口中 HttpClientServicehttpPost - IOExceptionpublic String sendRequest(org.apache.http.client.methods.HttpEntityEnclosingRequestBase httpEntityEnclosingRequestBase, String charset) throws IOException
sendRequest 在接口中 HttpClientServicehttpEntityEnclosingRequestBase - charset - IOExceptionpublic byte[] doPost(String url, List<org.apache.http.NameValuePair> postParams) throws IOException
doPost 在接口中 HttpClientServiceurl - 请求url地址postParams - 请求参数IOExceptionpublic byte[] doPost(String url, List<org.apache.http.NameValuePair> postParams, String charset) throws IOException
doPost 在接口中 HttpClientServiceurl - postParams - charset - IOExceptionpublic InputStream doGetReturnStream(String url) throws IOException
HttpClientServicedoGetReturnStream 在接口中 HttpClientServiceIOExceptionCopyright © 2020 GTMAP. All rights reserved.