【发布时间】:2015-10-01 09:30:08
【问题描述】:
我使用 Cordova 制作了一个 Windows Phone 8.1 应用程序,它使用 PushPlugin 进行通知。我已经成功订阅了这样的频道:
https://db3.notify.windows.com/?token=AwYAAACgzvv%2b6pMI9lq1oUFa3HF31%....
我尝试使用 PHP 发送一个简单的 Toast 通知(见下文),但 Microsoft 服务器给出了 Header 400 - Bad Request answer。
HTTP/1.1 400 Bad Request Content-Length: 0 X-WNS-MSG-ID: D5DAEFC56A10C79 X-WNS-DEBUG-TRACE: DB3WNS4011233 Strict-Transport-Security: max-age=31536000; includeSubDomains WWW-Authenticate: Bearer Date: Thu, 01 Oct 2015 09:20:48 GMT
'内容类型:文本/xml'
'接受:应用程序/*'
"X-NotificationClass: $delay"
<?xml version="1.0" encoding="utf-8"?>
<wp:Notification xmlns:wp="WPNotification">
<wp:Toast>
<wp:Text1>test</wp:Text1>
<wp:Text2>test</wp:Text2>
</wp:Toast>
</wp:Notification>
【问题讨论】:
标签: cordova push-notification windows-phone-8.1 windows-phone