diff --git a/docs/API.md b/docs/API.md index 8ed3035d4..e415ddba8 100644 --- a/docs/API.md +++ b/docs/API.md @@ -51,7 +51,7 @@ Attribute | Type | Default | Description Attribute | Type | Default | Description --------- | ---- | ------- | ----------- -`browser.pushServiceURL` | `string` | `http://push.api.phongeap.com/v1/push` | Optional. URL for the push server you want to use. +`browser.pushServiceURL` | `string` | `http://push.api.phongap.com/v1/push` | Optional. URL for the push server you want to use. #### iOS @@ -100,7 +100,7 @@ var push = PushNotification.init({ senderID: "12345679" }, browser: { - pushServiceURL: 'https://yourPushServer.com/push' + pushServiceURL: 'http://push.api.phongap.com/v1/push' }, ios: { alert: "true", diff --git a/docs/EXAMPLES.md b/docs/EXAMPLES.md index 688f2de6f..a1ff18acb 100644 --- a/docs/EXAMPLES.md +++ b/docs/EXAMPLES.md @@ -14,7 +14,7 @@ var push = PushNotification.init({ senderID: "12345679" }, browser: { - pushServiceURL: 'https://yourPushServer.com/push' + pushServiceURL: 'http://push.api.phongap.com/v1/push' }, ios: { alert: "true", diff --git a/docs/PAYLOAD.md b/docs/PAYLOAD.md index 28477c76c..3d18f7479 100644 --- a/docs/PAYLOAD.md +++ b/docs/PAYLOAD.md @@ -72,7 +72,7 @@ var push = PushNotification.init({ "senderID": "12345679" }, browser: { - pushServiceURL: 'https://yourPushServer.com/push' + pushServiceURL: 'http://push.api.phongap.com/v1/push' }, "ios": { "alert": "true", @@ -99,7 +99,7 @@ var push = PushNotification.init({ "iconColor": "blue" }, browser: { - pushServiceURL: 'https://yourPushServer.com/push' + pushServiceURL: 'http://push.api.phongap.com/v1/push' }, "ios": { "alert": "true", diff --git a/www/browser/push.js b/www/browser/push.js index 2163baea6..217bd8616 100644 --- a/www/browser/push.js +++ b/www/browser/push.js @@ -57,7 +57,7 @@ var PushNotification = function(options) { // send encryption keys to push server var xmlHttp = new XMLHttpRequest(); - var xmlURL = (options.browser.pushServiceURL || 'http://push.api.phongeap.com/v1/push') + '/keys'; + var xmlURL = (options.browser.pushServiceURL || 'http://push.api.phongap.com/v1/push') + '/keys'; xmlHttp.open('POST', xmlURL, true); var formData = new FormData(); @@ -112,7 +112,7 @@ PushNotification.prototype.unregister = function(successCallback, errorCallback, serviceWorker.unregister().then(function(isSuccess) { if (isSuccess) { var xmlHttp = new XMLHttpRequest(); - var xmlURL = (that.options.browser.pushServiceURL || 'http://push.api.phongeap.com/v1/push') + '/keys/remove'; + var xmlURL = (that.options.browser.pushServiceURL || 'http://push.api.phongap.com/v1/push') + '/keys/remove'; xmlHttp.open('POST', xmlURL, true); var formData = new FormData();