且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

推送通知Drupal模块 - 删除设备(Web服务)

更新时间:2023-02-16 22:20:50

最后,我已经能够发现我失败了。



我正在使用这个网址



http:// www.myweb.com/ws-apps/push_notifications/1234



但是我忘了在URL中指定语言...调用以下URL我能够得到这个工作。



http://www.myweb.com/en/ws-apps/push_notifications/1234



我希望这可以是将来对别人有用。


I´ve started to work with this module and i´ve managed to register devices (following the instructions of his author posted here).

Now i'm trying to unregister devices but when i send the http delete request (sending the token parameter with the value stored in DB) the message that i obtain is "HTTP/1.1 301 Moved Permanently" and i have no idea what´s happening here.

I´ve been surfing the net but i didn´t find anything related to this...

If you need any additional info let me know.

Thanks in advance

EDIT:

I´m using a java rest client (RESTClient 3.2.1), which worked for register devices, to test these web services. To remove the device I´m setting a DELETE request pointing to this URL

http://www.myweb.com/ws-apps/push_notifications/1234

Where "1234" is the ID of a test device that I´ve saved before.

I´m still getting the error mentioned...

Finally i´ve been able to discover where i was failing.

I was using this url

http://www.myweb.com/ws-apps/push_notifications/1234

But i forgot to specify the language too in the URL... Calling the following URL I was able to get this working.

http://www.myweb.com/en/ws-apps/push_notifications/1234

I hope this could be useful for someone else in future.