The set command stages an HTTP POST request with the content of a
file.
If the "requestheader" parameter is set to 0 with the %HTTPCFG command, the file contains the body
of the POST request. If the "requestheader" is set to
1, the file contains the headers and body of the POST
request.
For HTTP and HTTPS error codes and server response codes, see HTTP and HTTPS error codes.
Syntax:
%HTTPPOSTFILE=<file_name>
The set command parameter and its defined values are the following:
- <file_name>
- String. Maximum length 62 bytes. File name.
When the request is sent with the %HTTPREAD command, the following Unsolicited Result Code (URC) is returned:
%HTTPPOSTFILE: <err>,<httprspcode>[,<content_length>]
The response parameter and its defined value are the following:
- <content_length>
- Integer. Length of HTTP response content in bytes.
The following command example sends a POST request from a file:
AT%HTTPPOSTFILE="data.txt"
OK