Set command

nRF93M1 Cellular AT Commands

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 POST request data in bytes.
If the "requestheader" parameter is set to 0 with the %HTTPCFG command, the input data includes the body of the POST request.
If the "requestheader" is set to 1 with the %HTTPCFG command, the input data includes the headers and body of the POST request.
When the data length reaches <data_length>, the module switches back to command mode.
<input_time>
Integer, 1–65535. Maximum input time for the POST request 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