public class XHttpClientUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
ENCODE_TYPE |
| Constructor and Description |
|---|
XHttpClientUtil() |
| Modifier and Type | Method and Description |
|---|---|
static String |
httpGetRequest(String url) |
static String |
httpGetRequest(String url,
Map<String,Object> params) |
static String |
httpGetRequest(String url,
Map<String,Object> params,
Map<String,Object> headers) |
static String |
httpPostRequest(String url) |
static String |
httpPostRequest(String url,
Map<String,Object> params) |
static String |
httpPostRequest(String url,
Map<String,Object> params,
Map<String,Object> headers) |
public static String ENCODE_TYPE
public static String httpGetRequest(String url)
url - 访问urlpublic static String httpGetRequest(String url, Map<String,Object> params) throws URISyntaxException
URISyntaxExceptionpublic static String httpGetRequest(String url, Map<String,Object> params, Map<String,Object> headers) throws URISyntaxException
URISyntaxExceptionpublic static String httpPostRequest(String url, Map<String,Object> params) throws UnsupportedEncodingException
UnsupportedEncodingExceptionpublic static String httpPostRequest(String url, Map<String,Object> params, Map<String,Object> headers) throws UnsupportedEncodingException
UnsupportedEncodingExceptionCopyright © 2017. All rights reserved.