The set command stages an HTTP POST request. The module switches to
data mode to receive the request data.
For HTTP and HTTPS error codes and server response codes, see HTTP and HTTPS error codes.
Syntax:
%HTTPPOST=<data_length>[,<input_time>]
Response syntax:
CONNECT
The set command parameters and their defined values are the following:
- <data_length>
- Integer, 1–4096. Length of
POSTrequest data in bytes. - <input_time>
- Integer, 1–65535. Maximum input time for the
POSTrequest data in seconds. The default is 60.
When the request is sent with the %HTTPREAD command, the following Unsolicited Result Code (URC) is returned:
%HTTPPOST: <err>,<httprspcode>[,<content_length>]
The response parameter and its defined value are the following:
- <content_length>
- Integer. HTTP response content length in bytes.
The following command example sends a POST request with 13
bytes of body data:
AT%HTTPPOST=13,60
CONNECT
Hello, World!
OK