php - WNS X_WNS_MATCH bad request -


i've strange problem wns , push notification windows\ windows phone devices (8.1). if send push notification works well. problem when try send wns x-wns-match request. i'm sending current header:

delete /?token=<channel> http/1.1 host: db3.notify.windows.com accept: */* authorization: bearer <token> content-type: text/xml x-wns-match: type=wns/toast;all content-length: 0 

the answer service is:

http/1.1 400 bad request content-length: 0 x-wns-status: dropped x-wns-error-description: content type not supported x-wns-msg-id: c51e1a17972ea7a x-wns-debug-trace: db3wns2011131 strict-transport-security: max-age=31536000; includesubdomains date: wed, 13 may 2015 21:05:06 gmt 

i've tried set in request header the:

x-wns-type: wns/toast 

now doubt is: maybe server doesn't support delete method http? or maybe need set of different content type? i've followed wns documentation: https://msdn.microsoft.com/en-us/library/windows/apps/hh465435.aspx i'm testing on azurewebsite (iis) , on domain server apache 2.2.26

requests in php curl. thank you.

i've found problem. can't send content-type match wns, i've deleted row:

curl_setopt($request,curlopt_postfields, $template); 

where template empty, after this, need pass content-length (that's required http) way:

$header["contentlength"] = "content-length : ".strlen($template); curl_setopt($request,curlopt_httpheader, $header); 

and response status 200 ok

thank however, hope can someone


Comments

Popular posts from this blog

apache - PHP Soap issue while content length is larger -

asynchronous - Python asyncio task got bad yield -

javascript - Complete OpenIDConnect auth when requesting via Ajax -