【问题标题】:telit modem gets 400 bad request on post using AT commandstelit 调制解调器在使用 AT 命令后收到 400 个错误请求
【发布时间】:2017-03-15 04:33:33
【问题描述】:

我似乎无法让 telit (HE910-NAG) 蜂窝调制解调器按照数据表中的示例进行 http 发布。我发送的参数是“test=test”。无论我做什么,我都会收到 400 错误请求。以下是我的 at 命令。一旦获得“>>>”,我将发送 post 参数。获取请求工作正常。

这让我变得更秃了。

AT#SGACT=1,1


#SGACT: 33.231.2.193

OK

AT#HTTPCFG=0,"httpbin.org",80,0,,,0,120,1

OK

AT#HTTPSND=0,0,”POST /post HTTP/1.1”,9,0


>>>

OK




#HTTPRING: 0,400,"",0

AT#HTTPRCV=0



<<<
Server: nginx
Date: Tue, 01 Nov 2016 23:15:43 GMT
Content-Type: text/html
Content-Length: 166
Connection: close

<html>
<head><title>400 Bad Request</title></head>
<body bgcolor="white">
<center><h1>400 Bad Request</h1></center>
<hr><center>nginx</center>
</body>
</html>


OK

【问题讨论】:

    标签: at-command modem cellular-network


    【解决方案1】:

    我永远无法让它工作。我最终这样做了。它工作得很好,即使它没有那么短。附带说明一下,我之前尝试过,但无法让它工作,因为我在 AT#SD 命令中的地址周围有引号。我有引号是因为这个例子有引号。

    AT#SD=1,0,80,httpbin.org
    
    POST /login HTTP/1.1
    Host: httpbin.org
    Content-Type: application/x-www-form-urlencoded; charset=utf-8
    Content-Length: 9
    
    test=test
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多