2016-11-01 38 views
0

我似乎无法得到telit(HE910-NAG)移动调制解调器做数据表中的示例后http端。我发送的参数是“test = test”。无论我做什么,我都会收到400个错误的请求。以下是我的命令。我一旦得到“>>>”就发送post参数。获取请求正常工作。telit调制解调器使用AT命令获得400个错误的请求

这使我变得越来越秃头。

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 

回答

0

我永远无法得到这个工作。相反,我最终这样做了。即使它不那么短,它仍然很棒。在附注中,我之前尝试过这种方法,因为我在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 
相关问题