Commit de2beda0 authored by shaochangbin's avatar shaochangbin

http post 请求添加sid参数

parent e3ad9f86
......@@ -118,6 +118,9 @@ public class HttpTask extends BasicTask{
case "云从":
flag = checkCode(map);
break;
case "签名验签接入服务":
flag = checkStatusCode(map);
break;
default:
flag = checkStatusCode(map);
}
......@@ -139,6 +142,8 @@ public class HttpTask extends BasicTask{
}
return false;
}
private boolean checkCode(Map<String,String> map) {
JSONObject jsonObject = JSONObject.fromObject( map.get("body"));
if(map.containsKey("body")&&map.containsKey("body")){
......
......@@ -65,7 +65,6 @@ public class SendHttpUtil {
// 将上面的配置信息 运用到这个Get请求里
httpGet.setConfig(requestConfig);
// 由客户端执行(发送)Get请求
response = httpClient.execute(httpGet);
......@@ -119,6 +118,10 @@ public class SendHttpUtil {
httpPost.setEntity(entity);
httpPost.setHeader("Content-Type", "application/json;charset=utf8");
if (httpPost.getURI().toString().indexOf("192.168.56.48")>=0){
System.out.println("===================== 查看服务URL ======================");
httpPost.setHeader("sid","yunwei123");
}
// 响应模型
CloseableHttpResponse response =null;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment