Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/arduino/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Arduino esp8266 POST请求后服务器没有响应_Arduino_At Command_Esp8266_Arduino Esp8266 - Fatal编程技术网

Arduino esp8266 POST请求后服务器没有响应

Arduino esp8266 POST请求后服务器没有响应,arduino,at-command,esp8266,arduino-esp8266,Arduino,At Command,Esp8266,Arduino Esp8266,我是esp8266的新手,我有个问题。如果有人能帮我,那就太好了:) 我的问题是;当我从esp-01向网站发送post请求时,我无法收到任何响应标题。 我知道这个网站很好,因为它在发送post请求时有效(我也收到了标题和数据) 那么,为什么我在使用相同的post请求时,没有通过esp8266收到任何回复 这是我在串行监视器中的命令: AT+CIPSTART="TCP","franz95.000webhostapp.com",80 CONNECT OK AT+CIPSEND=162 OK &g

我是esp8266的新手,我有个问题。如果有人能帮我,那就太好了:)

我的问题是;当我从esp-01向网站发送post请求时,我无法收到任何响应标题。 我知道这个网站很好,因为它在发送post请求时有效(我也收到了标题和数据)

那么,为什么我在使用相同的post请求时,没有通过esp8266收到任何回复

这是我在串行监视器中的命令:

AT+CIPSTART="TCP","franz95.000webhostapp.com",80

CONNECT
OK
AT+CIPSEND=162

OK
> POST /esp8266_receiver.php HTTP/1.1\r\nHost: franz95.000webhostapp.com\r\nAccept: */*\r\nContent-Type: application/x-www-form-urlencoded\r\nContent-Length: 9\r\n\r\ndata=1234

busy s...

SEND OK
CLOSED
POST /esp8266_receiver.php HTTP/1.1
Host: franz95.000webhostapp.com
Accept: */*
Content-Type: application/x-www-form-urlencoded
Content-Length: 9

data=1234
HTTP/1.1 200 OK
Date: Tue, 21 Mar 2017 23:23:50 GMT
Content-Type: text/html; charset=UTF-8
Transfer-Encoding: chunked
Connection: keep-alive
Server: awex
X-Xss-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-Request-ID: 2c8d35a7a44ec64045f1059343a72b44

<p>EXITO : Se ha logrado escribir en el documento, data =1234</p>
这是我的标题:

AT+CIPSTART="TCP","franz95.000webhostapp.com",80

CONNECT
OK
AT+CIPSEND=162

OK
> POST /esp8266_receiver.php HTTP/1.1\r\nHost: franz95.000webhostapp.com\r\nAccept: */*\r\nContent-Type: application/x-www-form-urlencoded\r\nContent-Length: 9\r\n\r\ndata=1234

busy s...

SEND OK
CLOSED
POST /esp8266_receiver.php HTTP/1.1
Host: franz95.000webhostapp.com
Accept: */*
Content-Type: application/x-www-form-urlencoded
Content-Length: 9

data=1234
HTTP/1.1 200 OK
Date: Tue, 21 Mar 2017 23:23:50 GMT
Content-Type: text/html; charset=UTF-8
Transfer-Encoding: chunked
Connection: keep-alive
Server: awex
X-Xss-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-Request-ID: 2c8d35a7a44ec64045f1059343a72b44

<p>EXITO : Se ha logrado escribir en el documento, data =1234</p>
这是requestmaker.com的标题响应:

AT+CIPSTART="TCP","franz95.000webhostapp.com",80

CONNECT
OK
AT+CIPSEND=162

OK
> POST /esp8266_receiver.php HTTP/1.1\r\nHost: franz95.000webhostapp.com\r\nAccept: */*\r\nContent-Type: application/x-www-form-urlencoded\r\nContent-Length: 9\r\n\r\ndata=1234

busy s...

SEND OK
CLOSED
POST /esp8266_receiver.php HTTP/1.1
Host: franz95.000webhostapp.com
Accept: */*
Content-Type: application/x-www-form-urlencoded
Content-Length: 9

data=1234
HTTP/1.1 200 OK
Date: Tue, 21 Mar 2017 23:23:50 GMT
Content-Type: text/html; charset=UTF-8
Transfer-Encoding: chunked
Connection: keep-alive
Server: awex
X-Xss-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-Request-ID: 2c8d35a7a44ec64045f1059343a72b44

<p>EXITO : Se ha logrado escribir en el documento, data =1234</p>
HTTP/1.1200正常
日期:2017年3月21日星期二23:23:50 GMT
内容类型:text/html;字符集=UTF-8
传输编码:分块
连接:保持活力
服务器:awex
X-Xss-Protection:1;模式=块
X-Content-Type-Options:nosniff
X-Request-ID:2c8d35a7a44ec64045f1059343a72b44
EXITO:Se ha logrado describir en el documento,数据=1234


通过切换使用透明传输模式

AT+CIPSTART="TCP","franz95.000webhostapp.com",80
CONNECT
OK    
AT+CIPMODE=1
OK
AT+CIPSEND
>

并将标题复制粘贴到控制台以传递数据。

通过切换使用透明传输模式

AT+CIPSTART="TCP","franz95.000webhostapp.com",80
CONNECT
OK    
AT+CIPMODE=1
OK
AT+CIPSEND
>

然后将标题复制粘贴到控制台以传递数据。

在串行监视器中键入
\n
会发送
/
n
字符,而不是一个新行字符。我应该如何发送CR和NL来抛出串行监视器?请粘贴最后使用的命令好吗?我不知道你所说的“CR和LF的ascii字符”是什么意思,我面临着同样的问题将
\n
插入串行监视器会同时发送
/
n
字符,而不是一个新行字符。我应该如何发送CR和NL来抛出串行监视器?你能粘贴最后使用的命令吗?我不确定你所说的“CR和LF的ascii字符”是什么意思,我面临着同样的问题。它不起作用,应该像我在串行监视器中键入的那样起作用。还有其他想法吗?没有,\n只是一个字节作为NL。但您发送\+n,2个字节。打开记事本+,确保你的CR+NL包含在标题中。与记事本++相关的文档:@Franz95可以试试吗?谢谢你的回答,你是对的!似乎我在发送\+n(两个字节)。我证明了发送CR和LF的ascii字符是有效的!!它不工作,应该像我在串行监视器中键入的那样工作。还有其他想法吗?没有,\n只是一个字节作为NL。但您发送\+n,2个字节。打开记事本+,确保你的CR+NL包含在标题中。与记事本++相关的文档:@Franz95可以试试吗?谢谢你的回答,你是对的!似乎我在发送\+n(两个字节)。我证明了发送CR和LF的ascii字符是有效的!!