我正在尝试使用ESP8266检索HTTP资源(http://srcafe21.cafe24.com/mylight.php?id=2
):
ESP8266 AT commands :
AT+CWMODE=3
AT+RST
AT+CWJAP="iptime-3","20030214"
AT+CIFSR
AT+CIPMUX=0
AT+CIPSTART="TCP","srcafe21.cafe24.com",80
AT+CIPSEND=60
GET/HTTP/1.1
Host:srcafe21.cafe24.com/mylight.php?id=2
AT+CIPCLOSE
我收到了这个回复:
SEND OK +IPD,311:HTTP/1.1 400 Bad Request Server: nginx Date: ....
我做错了什么?
答案 0 :(得分:1)
您使用HTTP是错误的。它应该是
GET /mylight.php?id=2 HTTP/1.1
Host: srcafe21.cafe24.com