Arduino Esp8266响应超时

时间:2018-06-07 16:25:48

标签: arduino esp8266 http-status-code-408

我试图测试从我的Arduino发送HTTP请求。我决定使用免费的RESTful网络服务 - http://services.groupkt.com。但出了点问题,我不明白什么。

GET请求:

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

串行监视器:

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

我做错了什么?

1 个答案:

答案 0 :(得分:0)

HTTP与Telnet不同。您无法在串行监视器中逐行输入HTTP请求。 HTTP请求是由程序发送的,超时是接收的 服务器上的完整请求是一两秒钟。写一个草图发送请求。