public static void sendCall(GeneratedMessage call, Protocol protocol, String streamId, String url) throws IOException {
log.debug("[call] " + call);
Restty restty = Restty.create(url)
.addAccept(protocol.mediaType())
.addMediaType(protocol.mediaType())
.requestBody(protocol.getSendBytes(call));
if (StringUtils.isNotBlank(streamId)) {
restty.addHeader("Mesos-Stream-Id", streamId);
}
try {
restty.postNoResponse();
} catch (IOException e) {
log.warn("send call to mesos master failed, due to : " + e);
throw e;
}
}
SendUtils.java 文件源码
java
阅读 25
收藏 0
点赞 0
评论 0
项目:Juice
作者:
评论列表
文章目录