public class Request extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
CONTENT_TYPE_JSON |
static String |
CONTENT_TYPE_XML |
| 构造器和说明 |
|---|
Request() |
| 限定符和类型 | 方法和说明 |
|---|---|
String |
sendBatchPostRequest(String requestJsonStr,
String url)
批量发送Json Post请求
|
String |
sendBatchPostRequestXML(String requestXmlStr,
String url)
批量发送XML Post请求
|
String |
sendBatchPutRequest(String requestJsonStr,
String url)
批量发送Json Put请求
|
String |
sendDeleteRequest(String url)
发送Json Delete请求
|
String |
sendGetRequest(String url)
发送Json get请求
|
String |
sendHeadRequest(String url)
发送Json Head请求
|
String |
sendOptionsRequest(String url)
发送Json Options请求
|
String |
sendPostRequest(String requestJsonStr,
String url)
发送Json Post请求
|
String |
sendPostRequestXML(String requestXmlStr,
String url)
发送XML Post请求
|
String |
sendPutRequest(String requestJsonStr,
String url)
发送Json Put请求
|
String |
sendPutRequestXML(String requestJsonStr,
String url)
发送Json Put请求
|
String |
sendRequest(String requsetName,
List<Map<String,String>> requestListMap,
String url)
发送ListMap格式请求
|
String |
sendRequest(String requestJsonStr,
String url)
发送Json请求
|
String |
sendTraceRequest(String url,
String responce)
发送Json Trace请求
|
void |
setHeaders(String headerKey,
String headerVal)
设置请求中的Header
|
void |
setProxy(String ipAddress,
int port,
String scheme)
设置请求代理
|
void |
setRequestConfig(String configKey,
String configVal)
设置请求Config
|
public String sendRequest(String requestJsonStr, String url) throws Exception
Exceptionpublic String sendPostRequest(String requestJsonStr, String url) throws Exception
Exceptionpublic String sendPostRequestXML(String requestXmlStr, String url) throws Exception
Exceptionpublic String sendBatchPostRequest(String requestJsonStr, String url) throws Exception
Exceptionpublic String sendBatchPostRequestXML(String requestXmlStr, String url) throws Exception
Exceptionpublic String sendHeadRequest(String url) throws Exception
Exceptionpublic String sendPutRequest(String requestJsonStr, String url) throws Exception
Exceptionpublic String sendPutRequestXML(String requestJsonStr, String url) throws Exception
Exceptionpublic String sendBatchPutRequest(String requestJsonStr, String url) throws Exception
Exceptionpublic String sendDeleteRequest(String url) throws Exception
Exceptionpublic String sendOptionsRequest(String url) throws Exception
Exceptionpublic String sendTraceRequest(String url, String responce) throws Exception
Exceptionpublic String sendRequest(String requsetName, List<Map<String,String>> requestListMap, String url) throws Exception
ExceptionCopyright © 2019. All rights reserved.