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