User Manual

Table Of Contents
SARA-R4 series-AT commands manual
UBX-17003787 - R16
22HTTP
Page 266 of 401
Type Syntax Response Example
<HTTP_content_type>[,<user_
defined_content_type>]]
OK
POST file command
Set AT+UHTTPC=<profile_id>,4,<path>,
<filename>,<filesystem_name>,
<HTTP_content_type>[,<user_
defined_content_type>]
OK AT+UHTTPC=0,4,"/path/
file.html","responseFilename",
"filesystemName",0
OK
POST data command
Set AT+UHTTPC=<profile_id>,5,
<path>,<filename>,<data>,<HTTP_
content_type>[,<user_defined_
content_type>]
OK AT+UHTTPC=0,5,"/path/file.html",
"responseFilename","data",0
OK
GET FOTA update file
Set AT+UHTTPC=<profile_id>,100,
<path>
OK AT+UHTTPC=0,100,"/path/file.html"
OK
Test AT+UHTTPC=? +UHTTPC: (list of supported
<profile_id>s),(list of supported
<http_command>s)
OK
+UHTTPC: (0-3),(0-5),100
OK
URC +UUHTTPCR: <profile_id>,<http_
command>,<http_result>[,<http_
status_code>,<md5_sum>]
+UUHTTPCR: 0,1,1
22.3.3Defined values
Parameter Type Description
<profile_id> Number HTTP profile identifier, in range 0-3
<http_command> Number
0: HEAD command; issue an HEAD request to the HTTP server
1: GET command; perform a GET request to the HTTP server
2: DELETE command; send a DELETE request to the HTTP server
3: PUT command; perform a PUT request to the HTTP server.
4: POST a file command; issue a POST request for sending a file to the HTTP server
5: POST data command; send a POST request to the HTTP server using the data
specified in <data> parameter
100: GET FOTA update file; download the FOTA update file
<path> String Path of HTTP server resource; the maximum length is:
SARA-R404M / SARA-R410M-01B / SARA-R410M-02B / SARA-R410M-52B /
SARA-R412M / SARA-N4 - 256 characters
SARA-R410M-63B / SARA-R410M-73B / SARA-R410M-83B - 2048 characters
<filename> String Filename where the HTTP server response will be stored. If the file already exists, it
will be overwritten. If the parameter is an empty string (""), the default "http_last_
response_<profile_id>" filename will be used. For file system file name and data size
limits see File system limits.
<filesystem_name> String File system filename representing the file system filename to be sent to the HTTP
server within the POST / PUT request. For file system file name and data size limits
see File system limits.
<HTTP_content_
type>
Number HTTP Content-Type identifier. It represents the HTTP Content-Type identifier.
Allowed values:
0: application/x-www-form-urlencoded
1: text/plain
2: application/octet-stream
3: multipart/form-data
4: application/json (supported only for PUT and POST file command)
5: application/xml
6: user defined with <user_defined_content_type>
<user_defined_
content_type>
Number Used only when <HTTP_content_type>=6 (user defined Content-Type). The
maximum length is 64 characters.