public class HttpUtil extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
static AtomicInteger |
timeoutNum |
| 构造器和说明 |
|---|
HttpUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static HttpURLConnection |
CreateGetHttpConnection(String uri) |
static HttpURLConnection |
CreatePostHttpConnection(HostType hostType,
String appKey,
String appSecret,
String uri) |
static HttpURLConnection |
CreatePostHttpConnection(HostType hostType,
String appKey,
String appSecret,
String uri,
String contentType) |
static HttpURLConnection |
getHttpURLConnection(HostType hostType,
String uri) |
static byte[] |
readInputStream(InputStream inStream) |
static String |
returnResult(HttpURLConnection conn) |
static void |
setBodyParameter(String str,
HttpURLConnection conn) |
public static AtomicInteger timeoutNum
public static HttpURLConnection CreateGetHttpConnection(String uri) throws MalformedURLException, IOException
public static void setBodyParameter(String str, HttpURLConnection conn) throws IOException
IOExceptionpublic static HttpURLConnection CreatePostHttpConnection(HostType hostType, String appKey, String appSecret, String uri) throws MalformedURLException, IOException, ProtocolException
public static HttpURLConnection CreatePostHttpConnection(HostType hostType, String appKey, String appSecret, String uri, String contentType) throws MalformedURLException, IOException, ProtocolException
public static HttpURLConnection getHttpURLConnection(HostType hostType, String uri) throws IOException
IOExceptionpublic static byte[] readInputStream(InputStream inStream) throws Exception
Exceptionpublic static String returnResult(HttpURLConnection conn) throws Exception
ExceptionCopyright © 2020 RcongCloud Group. All rights reserved.