public class HttpUtil extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
HttpURLConnection |
buildConn(String url) |
HttpURLConnection |
buildSSLConn(String url) |
long |
getConnectTimeOut() |
int |
getReadTimeOut() |
byte[] |
httpGet(String url) |
byte[] |
httpPost(String url,
byte[] data) |
byte[] |
httpPost(String url,
Map<String,String> args) |
byte[] |
httpPostJson(String url,
String json) |
byte[] |
httpsGet(String url) |
byte[] |
httpsPost(String url,
byte[] data) |
byte[] |
httpsPost(String url,
Map<String,String> args) |
void |
setConnectTimeOut(int connectTimeOut) |
void |
setReadTimeOut(int readTimeOut) |
public int getReadTimeOut()
public void setReadTimeOut(int readTimeOut)
public long getConnectTimeOut()
public void setConnectTimeOut(int connectTimeOut)
public HttpURLConnection buildSSLConn(String url) throws Exception
Exceptionpublic HttpURLConnection buildConn(String url) throws Exception
Exceptionpublic byte[] httpsPost(String url, Map<String,String> args) throws Exception
ExceptionCopyright © 2020. All rights reserved.