thingsboard - SIM800A 向 Thingsboard 发送数据时出现问题
问题描述
我使用 SIM800 连接并将数据发送到 Thingsboard。我使用 AT 命令和 Hercules 终端进行测试。一切正常,直到我通过 Thingsboard 发送 API 请求 POST 支持。这是我用来向 Thingboard 发送数据的 POST 请求
POST --data "{"temperature":40,"humidity":72}" https://demo.thingsboard.io/api/v1/2kRteaplS6EYomKeziqf/telemetry --header "Content-Type:application/json"
和 Thingsboard 返回错误
SEND OK HTTP/1.0 400 Bad request Cache-Control: no-cache Connection: close Content-Type: text/html <html><body><h1>400 Bad request</h1> Your browser sent an invalid request. </body></html>
但是当我用 curl 命令检查这个 API 时,thingsboard 会收到我发送的数据
curl -v -X POST --data "{"temperature":40,"humidity":72}" https://demo.thingsboard.io/api/v1/2kRteaplS6EYomKeziqf/telemetry --header "Content-Type:application /json"
当我通过 ATcommand 发送时,我不知道 POST 请求有什么问题?请帮我。
解决方案
推荐阅读
- r - 使用行索引在 dplyr 中建立索引
- keras - 如何恢复 KerasClassfier?
- r - 闪亮仪表板中的 Ggplot
- node.js - 重定向时找不到快速路由,但存在路由
- python - 'NewPost'对象没有属性'用户'(关闭)
- c# - WebBrowser 呈现与强调文本的差异
- ruby - 在比较 ruby 中的 2 个数组后,如何获得具有真/假值的数组?
- react-native - 如何创建具有多个步骤的模态?
- laravel - 是否可以在没有域名/localhost 名称或
- css - Why is text contained in div that follows a floated div appearing out of place?