public class PushNotificationSenderEndpoint extends Object
| Constructor and Description |
|---|
PushNotificationSenderEndpoint() |
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
send(InternalUnifiedPushMessage message,
javax.servlet.http.HttpServletRequest request)
RESTful API for sending Push Notifications.
|
public javax.ws.rs.core.Response send(InternalUnifiedPushMessage message, @Context javax.servlet.http.HttpServletRequest request)
HTTP Basic (credentials PushApplicationID:masterSecret).
Messages are submitted as flexible JSON maps. Below is a simple example:
curl -u "PushApplicationID:MasterSecret"
-v -H "Accept: application/json" -H "Content-type: application/json"
-X POST
-d '{
"message": {
"alert": "HELLO!",
"sound": "default",
"user-data": {
"key": "value",
}
}'
https://SERVER:PORT/CONTEXT/rest/sender
Details about the Message Format can be found HERE!
Request Header aerogear-sender uses to identify the used client. If the header is not present, the standard "user-agent" header is used.
message - message to sendrequest - the requestCopyright © 2019 JBoss by Red Hat. All rights reserved.