|
|
|
|
@ -91,6 +91,7 @@ public class PostmanSchedulerService {
|
|
|
|
|
.data(dataString).build();
|
|
|
|
|
HttpHeaders httpHeaders = new HttpHeaders();
|
|
|
|
|
httpHeaders.setContentType(MediaType.APPLICATION_JSON);
|
|
|
|
|
httpHeaders.set("User-Agent", agentConfigReader.getApplicationName() + ", version: " + agentConfigReader.getApplicationVersion() + "(" + agentConfigReader.getApplicationCommitId() + ")" + ", host ID: " + agentConfigReader.getAgentConfigDto().getMyHostId());
|
|
|
|
|
HttpEntity<ReceiveMessageDto> bodyEntity = new HttpEntity<>(receiveMessageDto, httpHeaders);
|
|
|
|
|
RestTemplate restTemplate = new RestTemplate();
|
|
|
|
|
String url = "http://" + knownAgent.getHostName() + ":" + knownAgent.getListenPort() + "/listen";
|
|
|
|
|
@ -169,6 +170,7 @@ public class PostmanSchedulerService {
|
|
|
|
|
// http 준비
|
|
|
|
|
HttpHeaders httpHeaders = new HttpHeaders();
|
|
|
|
|
httpHeaders.setContentType(MediaType.MULTIPART_FORM_DATA);
|
|
|
|
|
httpHeaders.set("User-Agent", agentConfigReader.getApplicationName() + ", version: " + agentConfigReader.getApplicationVersion() + "(" + agentConfigReader.getApplicationCommitId() + ")" + ", host ID: " + agentConfigReader.getAgentConfigDto().getMyHostId());
|
|
|
|
|
MultiValueMap<String, Object> body = new LinkedMultiValueMap<>();
|
|
|
|
|
// 첫 번째 멀티파트는 message json
|
|
|
|
|
body.add("json", new HttpEntity<>(messageString, httpHeaders));
|
|
|
|
|
|