[Hilo] How to test HTTP POST feature?


#1

Answer: Hilo implements the standard POST command as defined by RFC. Here’s the example with a popular HTTP test server: httpbin.org/
AT+KCNXCFG=0,“GPRS”,“uninet”
AT+KHTTPCFG=0,“httpbin.org” ---- Set the server’s address.
AT+KHTTPHEADER=0---- Input the header“header.txt” then “–EOF–Pattern—“.
AT+KHTTPPOST=0,"/post"---- Input the body “body.txt”.
The content in “header.txt”:
Host: httpbin.org
Accept: /
Content-Length: 12
Content-Type: application/x-www-form-urlencoded
The content in “boday.txt” to post:
param0=12345