Arduino Esp8266 Response Timeout

1.3k Views Asked by At

I'm trying to test sending HTTP requests from my Arduino. I decided to use Free RESTful web service - http://services.groupkt.com. But something goes wrong and I don't understand what.

GET request:

GET /country/get/all HTTP/1.1
Host: 45.79.172.152
Connection: keep-alive

Serial Monitor:

AT+CIPMUX=0


OK

AT+CIPSTART="TCP","45.79.172.152",80

    CONNECT

    OK
    AT+CIPSEND=74


    OK
    > 

    busy s...

    Recv 74 bytes

    SEND OK

    +IPD,493:HTTP/1.1 408 Request Timeout
    Date: Thu, 07 Jun 2018 16:10:59 GMT
    Server: Apache/2.4.25 (Debian)
    Content-Length: 307
    Connection: close
    Content-Type: text/html; charset=iso-8859-1

    <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
    <html><head>
    <title>408 Request Timeout</title>
    </head><body>
    <h1>Request Timeout</h1>
    <p>Server timeout waiting for the HTTP request from the client.</p>
    <hr>
    <address>Apache/2.4.25 (Debian) Server at services.groupkt.com Port 80</address>
    </body></html>
    CLOSED

What I'm doing wrong?

1

There are 1 best solutions below

0
On

HTTP is not like Telnet. You can't enter a HTTP request line by line in Serial Monitor. HTTP requests are meant to be sent by a program and the timeout to receive the complete request on servers is one or two seconds. Write a sketch the sends the request.