diff options
author | Vitaly Takmazov | 2017-10-23 10:54:23 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2017-10-23 10:54:23 +0300 |
commit | f0e7e6866ae4fd4f518950480bc26fa823b7d919 (patch) | |
tree | 0ae7ac4d0e07e345105e638c9fef61b99f520019 | |
parent | 6bd93c6805c26f1b3969de5f0a3b67a0cb9a38d5 (diff) |
notifications: mpns cleanup
-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(); |