AT Command

Description

AT+SHREQ command is used to setup the HTTP request type in the Simcom modules.


Support

Simcom Module Tutorial

Examples

KeywordsAT+SHREQ syntax, examples, parameters, error, input, response.

Try the below script in the AT Command Tester tool

//Script: at+shreq - Setup HTTP request type in Simcom modules
//The AT commands in this script are applicable for Simcom modules only
//Check SIMCOM Module AT Command documentation

//Get the support for the commands
AT+SHREQ=?

//Wait
WAIT=1

//Get the current request
AT+SHREQ?

//Wait
WAIT=1

//Activate the network bearer
AT+CNACT=0,1

//Wait
WAIT=1

//Set up the HTTP URL
AT+SHCONF="URL","http://www.yahoo.com"

//Wait
WAIT=1

//HTTP body length
AT+SHCONF="BODYLEN",1024

//HTTP head length
AT+SHCONF="HEADERLEN",350

//HTTP connection
AT+SHCONN

//Wait
WAIT=1

//Get the connection status
AT+SHSTATE?

//Wait
WAIT=1

//Make the HTTP request
// 1- GET
// 2 - PUT
// 3 - POST
//4 - PATCH
//5 - HEAD
AT+SHREQ="http://www.yahoo.com",1

Output of the above script in the AT Command Tester tool

AT+SHREQ=?

+SHREQ: 512,(1-5)

OK
AT+SHREQ?

+SHREQ: ,0

OK
AT+CNACT=0,1

OK

+APP PDP: 0,ACTIVE
AT+SHCONF="URL","http://www.yahoo.com"

OK
AT+SHCONF="BODYLEN",1024

OK
AT+SHCONF="HEADERLEN",350

OK
AT+SHCONN

OK
AT+SHSTATE?

+SHSTATE: 1

OK
AT+SHREQ="http://www.yahoo.com",1

OK

+SHREQ: "GET",301,8