I am using esp8266 to send a GET Request but I am getting 408 Timeout error.
Here is a screenshot of my output.
1 Answer 1
I assume you're doing all this from the serial monitor. You can't use escape sequences like \r
in the serial monitor entry box. Everything you enter is evaluated as a string of separate ASCII characters; \r
is just a backslash character followed by lowercase r. To send a HTTP request, you make the serial monitor send the \r\n
for you.
- First set the serial monitor to
BOTH NL & CR
permanently; it will serve you well for commands and HTTP requests as it appends\r\n
to everything you send. - Count the number of bytes in the your HTTP request, including the carriage return and newline characters. I count 61 characters in your request.
- Use this count in
AT+CIPSEND
- Type the first line of your request, and stop right before the first
\r\n
, and click Send. Because of your setting, the monitor will now send what you typed with\r\n
suffixed to it. - Type and send each line of the request, just like you sent the first line, until you've sent the last line.
- Since there is an additional
\r\n
after the last line, you click Send again, without typing anything. And since the module requires\r
to indicate the end of the data packet, you click Send one last time.
Hopefully, this should give you the right results.
\r\n
string? Show us your code.