|
With Online AT Command Tester tool, you can test Simcom HTTP feature.
Test HTTP GET feature with AT+CHTTPACT command
Using the tool to test HTTP GET with your module.
You can also use the script mode in the tool to test AT+CHTTPACT command
Test HTTP POST feature with AT+CHTTPACT command
Using the tool, test the HTTP POST feature.
Also test HTTP POST with the script file included in the tool,
Try this script included in AT Command Tester Tool.
//Script: simcom_http_get_53xx_7500x_7600x.at
//Use this script to test HTTP POST AT command with Simcom modules.
//This script can be used on following Simcom modules-
//SIM53XX, SIM7100X, SIM7500X, SIM7600X
//Launch the HTTP Operation
AT+CHTTPACT="httpbin.org",80
//Wait for the +CHTTPACT: REQUEST from the module
WAIT=1
//Build a HTTP POST request
//<cr><lf> are script commands for carriage retun and line feed
//^z is a script command to send the CTRL+Z character
//The content length should match the post data
POST http://httpbin.org/post HTTP/1.1<cr><lf>Host: httpbin.org<cr><lf>User-Agent: AT Command Tester<cr><lf>Content-Length: 23<cr><lf><cr><lf>parm1=data1&parm2=data2
<cr><lf>^z<cr><lf>
Output of above script in AT Command Tester Tool.
AT+CHTTPACT="httpbin.org",80
+CHTTPACT: REQUEST
POST http://httpbin.org/post HTTP/1.1
Host: httpbin.org
User-Agent: AT Command Tester
Content-Length: 23
parm1=data1&parm2=data2
OK
+CHTTPACT: DATA,559
http/1.1 200 ok
connection: keep-alive
server: gunicorn/19.9.0
date: sat, 12 jan 2019 13:54:22 gmt
content-type: application/json
content-length: 313
access-control-allow-origin: *
access-control-allow-credentials: true
via: 1.1 vegur
{
"args": {},
"data": "parm1=data1&parm2=data2",
"files": {},
"form": {},
"headers": {
"Connection": "close",
"Content-Length": "23",
"Host": "httpbin.org",
"User-Agent": "AT Command Tester"
},
"json": null,
"origin": "216.3.13.179",
"url": "http://httpbin.org/post"
}
+CHTTPACT: 0
+STIN: 81