arduino uno r3通过HTTP协议上传,总是显示400,请问怎么办
我通过ESP8226,以HTTP协议的接入方式上传onenet,AT+CIPMUX=0 设置成单路连接模式
AT+CIPSTART="TCP","183.230.40.34",80//TCP连接
AT+CIPMODE=1//设置穿透模式
AT+CIPSEND//设置透传发送
POST /devices/省略/datapoints?type=5 HTTP/1.1
api-key:此处省略
Host:api.heclouds.com
Content-Length:25
{"datapoints":15}
如下是串口助手的数据:# SEND ASCII>
POST /devices/省略/datapoints?type=5 HTTP/1.1
api-key:此处省略
Host:api.heclouds.com
Content-Length:25
{"datapoints":15}
# RECV ASCII>
HTTP/1.1 400 Bad Request
Server: nginx
Date: Sat, 23 May 2020 13:35:45 GMT
Content-Type: text/html
Content-Length: 150
Connection: close
<html>
<head><title>400 Bad Request</title></head>
<body>
<center><h1>400 Bad Request</h1></center>
<hr><center>nginx</center>
</body>
</html>
请问是我代码错了么,还是我onenet有哪里配置错了么,如果需要我上传我的配置图,我可以发给你。
页:
[1]