public class PushNotificationSenderEndpoint extends Object
| Constructor and Description |
|---|
PushNotificationSenderEndpoint() |
public javax.ws.rs.core.Response send(Map<String,Object> message, @Context javax.servlet.http.HttpServletRequest request)
HTTP Basic (credentials PushApplicationID:masterSecret).
Messages are submitted as flexible JSON maps, like:
curl -3 -u "PushApplicationID:MasterSecret"
-v -H "Accept: application/json" -H "Content-type: application/json"
-X POST
-d '{
"alias" : ["someUsername"],
"deviceType" : ["someDevice"],
"categories" : ["someCategories"],
"variants" : ["someVariantIDs"],
"ttl" : 3600,
"message":
{
"key":"value",
"key2":"other value",
"alert":"HELLO!",
"action-category":"some value",
"sound":"default",
"badge":2,
"content-available" : true
},
"simple-push":"version=123"
}'
https://SERVER:PORT/CONTEXT/rest/sender
Details about the Message Format can be found HERE!Copyright © 2014 JBoss by Red Hat. All Rights Reserved.