AT Command

Description

AT+SHAHEAD command is used to setup the HTTP headers in the Simcom modules.


Support

Simcom Module Tutorial

Examples

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

Try the below script in the AT Command Tester tool

//Script: at+shahead - Setup HTTP headers 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+SHAHEAD=?

//Wait
WAIT=1

//Get the current headers
AT+SHAHEAD?

//Wait
WAIT=1

//Clear the HTTP header
AT+SHCHEAD

//Wait
WAIT=1

//Add header content
AT+SHAHEAD="Accept","text/html, */*"

//Wait
WAIT=1

//Add header content
AT+SHAHEAD="User-Agent","IOE Client"

//Wait
WAIT=1

//Add header content
AT+SHAHEAD="Content-Type","application/x-www-form-urlencoded"

//Wait
WAIT=1

//Add header content
AT+SHAHEAD="Connection","keep-alive"

//Wait
WAIT=1

//Add header content
AT+SHAHEAD="Cache-control","no-cache"

//Wait
WAIT=1

//Read back the HTTP header
AT+SHAHEAD?

Output of the above script in the AT Command Tester tool

AT+SHAHEAD=?

+SHAHEAD: 350,350

OK
AT+SHAHEAD?

OK
AT+SHCHEAD

OK
AT+SHAHEAD="Accept","text/html, */*"

OK
AT+SHAHEAD="User-Agent","IOE Client"

OK
AT+SHAHEAD="Content-Type","application/x-www-form-urlencoded"

OK
AT+SHAHEAD="Connection","keep-alive"

OK
AT+SHAHEAD="Cache-control","no-cache"

OK
AT+SHAHEAD?

+SHAHEAD: "Accept","text/html, */*"

+SHAHEAD: "User-Agent","IOE Client"

+SHAHEAD: "Content-Type","application/x-www-form-urlencoded"

+SHAHEAD: "Connection","keep-alive"

+SHAHEAD: "Cache-control","no-cache"

OK