I am working on a project which sends GPS longtitude and latitude to a server using Http POST method. I use GPRS of sim908 module and AT+Commands to communicate with this module.
Here are the commands related to Http Post:
The first command is used to set http parameters:
The second commands tells the module whether to use GET or POST method which is POST here.
The third one is used to recieve server response:
I know how to send data using GET method. I must put a string like: "?var1=value1&var2=value2" at the end of the url. Here is an example: "http://www.example.com/test/getdata.php?TI=12.1&TO=22.2&TR=33.3"
But how is the POST method? Could anyone help me please?
Thanks alot.
[SOLVED]:
SIM908 does actually support post even though it is poorly documented:
AT+HTTPINIT
AT+HTTPPARA="CID",1
AT+HTTPPARA="URL","http://108.167.133.20/.../index.php"
NB*** AT+HTTPDATA=, ****NB
Wait for DOWNLOAD response then send data (bytes needs to be exact)
AT+HTTPACTION=1
AT+HTTPREAD=1,100000