GabiaSmsService.java 文件源码

java
阅读 21 收藏 0 点赞 0 评论 0

项目:hedwig 作者:
@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;
        }
    }

}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号