SARA-R4/N4 series-AT Commands Manual
UBX-17003787 - R09

21HTTP
Page 218 of 307
Type Syntax Response Example
OK
Username
Set AT+UHTTP=<profile_id>,2,
<username>
OK AT+UHTTP=2,2,"my_user"
OK
Read AT+UHTTP=<profile_id>,2 +UHTTP: <profile_id>,2,<username>
OK
AT+UHTTP=2,2
+UHTTP: 2,2,"my_user"
OK
Password
Set AT+UHTTP=<profile_id>,3,
<password>
OK AT+UHTTP=2,3,"pwd"
OK
Read AT+UHTTP=<profile_id>,3 +UHTTP: <profile_id>,3,<password>
OK
AT+UHTTP=2,3
+UHTTP: 2,3,"pwd"
OK
Authentication type
Set AT+UHTTP=<profile_id>,4,<HTTP_
authentication>
OK AT+UHTTP=2,4,1
OK
Read AT+UHTTP=<profile_id>,4 +UHTTP: <profile_id>,4,<HTTP_
authentication>
OK
AT+UHTTP=2,4
+UHTTP: 2,4,1
OK
HTTP server port
Set AT+UHTTP=<profile_id>,5,<HTTP_
port>
OK AT+UHTTP=2,5,30
OK
Read AT+UHTTP=<profile_id>,5 +UHTTP: <profile_id>,5,<HTTP_
port>
OK
AT+UHTTP=2,5
+UHTTP: 2,5,30
OK
HTTP secure option
Set AT+UHTTP=<profile_id>,6,<HTTP_
secure>[,<USECMNG_profile>]
OK AT+UHTTP=2,6,1
OK
Read AT+UHTTP=<profile_id>,6 +UHTTP: <profile_id>,6,<HTTP_
secure>[,<USECMNG_profile>]
OK
AT+UHTTP=2,6
+UHTTP: 2,6,1
OK
HTTP add custom request headers
Set AT+UHTTP=<profile_id>,9,
<custom_request_header>
OK AT+UHTTP=2,9,"0:hdr0:val0"
OK
Read AT+UHTTP=<profile_id>,9 +UHTTP: <profile_id>,9,<custom_
request_header>
OK
AT+UHTTP=2,9
+UHTTP: 2,9,"0:hdr0:val0"
OK
Read AT+UHTTP=<profile_id> OK AT+UHTTP=2
OK
Test AT+UHTTP=? +UHTTP: (list of supported <profile_
id>s),(list of supported <op_code>s)
OK
+UHTTP: (0-3),(0-9)
OK
21.1.3î™–î™–î™–î™–Defined values
Parameter Type Description
<profile_id> Number HTTP profile identifier, in range 0-3
<op_code> Number
• 0: HTTP server IP address;
• 1: HTTP server name;
• 2: username
• 3: password