diff options
Diffstat (limited to 'juick-notifications')
-rw-r--r-- | juick-notifications/src/main/java/com/juick/components/MPNSClient.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/juick-notifications/src/main/java/com/juick/components/MPNSClient.java b/juick-notifications/src/main/java/com/juick/components/MPNSClient.java index f44db194..498d64dd 100644 --- a/juick-notifications/src/main/java/com/juick/components/MPNSClient.java +++ b/juick-notifications/src/main/java/com/juick/components/MPNSClient.java @@ -63,9 +63,9 @@ public class MPNSClient { void sendNotification(final String url, final String xml) throws IOException { HttpHeaders httpHeaders = new HttpHeaders(); - httpHeaders.add("Content-Type", "text/xml"); - httpHeaders.add("Authorization", accessToken); - httpHeaders.add("X-WNS-Type", "wns/toast"); + httpHeaders.setContentType(MediaType.TEXT_XML); + httpHeaders.set("Authorization", accessToken); + httpHeaders.set("X-WNS-Type", "wns/toast"); HttpEntity<String> requestEntity = new HttpEntity<>(httpHeaders); ResponseEntity<Void> responseEntity = restService.getRest().exchange(url, HttpMethod.POST, requestEntity, Void.class); HttpStatus statusCode = responseEntity.getStatusCode(); |