mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-11 03:46:50 +08:00
调用接口token问题
This commit is contained in:
@@ -12,6 +12,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.xboe.core.SysConstant;
|
||||
import com.xboe.core.api.TokenProxy;
|
||||
import com.xboe.core.utils.OkHttpUtil;
|
||||
import com.xboe.standard.BaseConstant;
|
||||
import com.xboe.stat.IEventDataSender;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -54,7 +55,9 @@ public class EventDataSender implements IEventDataSender{
|
||||
try {
|
||||
ObjectMapper mapper=new ObjectMapper();
|
||||
String json =mapper.writeValueAsString(params);
|
||||
String[] headers=new String[] {"token",token};
|
||||
//String[] headers=new String[] {"token",token};
|
||||
String[] headers=new String[] {BaseConstant.HTTP_ACCESS_TOKEN,token};
|
||||
|
||||
String responseStr = okHttpUtil.doPostJson(url, json,headers);
|
||||
if(responseStr.indexOf("\"status\":200")==-1) {
|
||||
log.error("发送事件失败:"+responseStr);
|
||||
|
||||
Reference in New Issue
Block a user