@Override
public void sendCallBack(Sms sms, Object result) throws UnirestException {
// TODO Auto-generated method stub
for(int count = 0; count < 10; count++){
try {
HttpResponse<JsonNode> jsonResponse = Unirest.post(sms.getCallbackUrl())
.header("accept", "application/json")
.field("result", result)
.asJson();
break;
}
catch (UnirestException e) {
// TODO Auto-generated catch block
e.printStackTrace();
if(count == 10){
throw new UnirestException(e);
}
continue;
}
}
}
GabiaSmsService.java 文件源码
java
阅读 21
收藏 0
点赞 0
评论 0
项目:hedwig
作者:
评论列表
文章目录