Hi, I am trying to download a file from my webserver with a POST request, but the module becomes unresponsive. Can the following sequence of commands be used to get a file from a webserver?
AT+KTCPCFG=1,0,url.com,80
AT+KTCPCNX=1
AT+KTCPSND=1,SIZE
POST /test HTTP/1.1
Host: foo.example
Content-Type: application/x-www-form-urlencoded
Content-Length: 27
AT+KHTTPHEADER=1
CONNECT
Accept : text/html
Context-Length: 64
OK
AT+KHTTPPOST=1, “/get.cgi”
CONNECT
(…Data send…)
HTTP/1.0 200 OK
Content-Type: text/plain
Context-Length: 37
Your data have been accepted.
Hi,
Yes, I don’t get an “OK” from the modem.
Do I need to send “–EOF–Pattern–” as a literal string or a “+++” string to indicate EOF?
ContentLength is a variable that holds a numeric value (22 for example)