public class WxHttpClient extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
CHAR_SET_UTF_8 |
static String |
HTTP_METHOD_GET |
static String |
HTTP_METHOD_POST |
| 构造器和说明 |
|---|
WxHttpClient() |
| 限定符和类型 | 方法和说明 |
|---|---|
String |
get(String url) |
InputStream |
getInputStream(String url) |
static WxHttpClient |
getInstance() |
String |
post(String url,
List<? extends org.apache.http.NameValuePair> parameters) |
String |
post(String url,
String data) |
InputStream |
postInputStream(String url,
String data) |
String |
upload(String url,
File file) |
String |
upload(String url,
File file,
String fileName) |
public static WxHttpClient getInstance()
public String get(String url) throws IOException
IOExceptionpublic String post(String url, String data) throws IOException
IOExceptionpublic String post(String url, List<? extends org.apache.http.NameValuePair> parameters) throws IOException
IOExceptionpublic String upload(String url, File file) throws IOException
IOExceptionpublic String upload(String url, File file, String fileName) throws IOException
IOExceptionpublic InputStream getInputStream(String url) throws IOException
IOExceptionpublic InputStream postInputStream(String url, String data) throws IOException
IOExceptionCopyright © 2021. All rights reserved.