2
\$\begingroup\$

I want to send HTTP parameters using POST method through SIM908 GPRS. Here is and example of what I want to send:

POST /path/... HTTP/1.1
User-Agent: SIMCOM_MODULE
Host: website_name
Content-Type: application/josn; charset=utf-8
Content-Length: Length_num
Accept-Language: en-us
Connection: Keep-Alive
Requst_Body

I have visited this answer: Posting to php server using SIM900 GPRS with AT commands for using POST method to send data but this includes just the request body. What about the request parameters (headers)?

Is there any method to send them through HTTP or should I send them using TCP packet and how can I do it?

\$\endgroup\$
  • \$\begingroup\$ This is not an electrical engineering question. Sorry, but you have posted on the wrong site. Also you are missing links to datasheets for the device. \$\endgroup\$ – Transistor Sep 18 '16 at 8:38
3
\$\begingroup\$

For custom client headers use the AT+HTTPPARA command with HTTPParamTag set to USERDATA. It is described in Simcom AT Commands Manual.

\$\endgroup\$
  • \$\begingroup\$ This is not working, at least for the SIM900R chip. If you have examples will be great to look at \$\endgroup\$ – Maxxie Feb 15 '17 at 14:28
1
\$\begingroup\$

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

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.