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

2023-06-22php开发问题
1

本文介绍了推送通知 Drupal 模块 - 删除设备(Web 服务)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

我已经开始使用这个模块并且我已经成功注册了设备(按照他的作者发布的说明此处).

Ive started to work with this module and ive managed to register devices (following the instructions of his author posted here).

现在我正在尝试注销设备,但是当我发送 http 删除请求(发送带有存储在 DB 中的值的令牌参数)时,我获得的消息是HTTP/1.1 301 永久移动",我不知道这里发生了什么.

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 whats happening here.

我一直在网上冲浪,但我没有找到与此相关的任何内容...

Ive been surfing the net but i didnt find anything related to this...

如果您需要任何其他信息,请告诉我.

If you need any additional info let me know.

提前致谢

我正在使用 java rest 客户端(RESTClient 3.2.1),它有效用于注册设备,以测试这些 Web 服务.要删除设备,我正在设置指向此 URL 的 DELETE 请求

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

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

其中1234"是我之前保存的测试设备的 ID.

Where "1234" is the ID of a test device that Ive saved before.

我仍然收到提到的错误...

Im still getting the error mentioned...

推荐答案

我终于能够发现我失败的地方.

Finally ive been able to discover where i was failing.

我正在使用这个网址

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

但我也忘记在 URL 中指定语言......调用以下 URL 我能够让它工作.

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.

这篇关于推送通知 Drupal 模块 - 删除设备(Web 服务)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

The End

相关推荐

PHP实现DeepL翻译API调用
DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以...
2025-08-20 php开发问题
168

PHP通过phpspreadsheet导入Excel日期数据处理方法
PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的...
2024-10-23 php开发问题
287

mediatemple - 无法使用 codeigniter 发送电子邮件
mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)...
2024-08-23 php开发问题
11

Laravel Gmail 配置错误
Laravel Gmail Configuration Error(Laravel Gmail 配置错误)...
2024-08-23 php开发问题
16

将 PHPMailer 用于 SMTP 的问题
Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)...
2024-08-23 php开发问题
4

关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题
Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)...
2024-08-23 php开发问题
17