【发布时间】:2015-08-23 08:44:36
【问题描述】:
我正在尝试使用 Arduino 和 ESP8266 发出 GET 请求。
我正在使用此代码:
AT+CIPSEND=140
GET taub-prayer-ramym/girls HTTP/1.1\r\nHost: taub-prayer-ramym.c9.io\r\nUser-Agent: ESP8266_HTTP_Client\r\nConnection: keep-alive\r\n\r\n
但我得到这个作为回报:
+IPD,187: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>
CLOSED
我尝试修复语法但没有成功。有什么建议吗?
【问题讨论】:
-
尝试使用 tcpdump 或 wireshark 转储查询,看看有什么问题。我已经发送了查询,我收到了
502 Bad Gateway -
@Ôrel 你找到解决方案了吗?
-
不,你能在浏览器上或使用 curl 上做一个工作请求吗?我得到
No Cloud9 workspace is bound to this domain name
标签: html arduino http-get esp8266