From f0e7e6866ae4fd4f518950480bc26fa823b7d919 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Mon, 23 Oct 2017 10:54:23 +0300 Subject: notifications: mpns cleanup --- .../src/main/java/com/juick/components/MPNSClient.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'juick-notifications/src/main/java/com') 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 requestEntity = new HttpEntity<>(httpHeaders); ResponseEntity responseEntity = restService.getRest().exchange(url, HttpMethod.POST, requestEntity, Void.class); HttpStatus statusCode = responseEntity.getStatusCode(); -- cgit v1.2.3