PN 1001933 rev 2
© NimbeLink Corp. 2022. All rights reserved.
18
AT+QSSLSEND=1
>
POST /things/AWS_TEST_THING/shadow HTTP/1.1
"CTRL+M, CTRL+J"
Host: a272y7s3bxum89.iot.us-east-2.amazonaws.com:8443
"CTRL+M, CTRL+J"
Content-Type: application/json
"CTRL+M, CTRL+J"
Content-Length: 115
"CTRL+M, CTRL+J, CTRL+M, CTRL+J"
{"state":{"desired":{"string1":"TLS Connect to AWS","string2":"Using the
built-in stack","string3":"of the BG96"}}}
"CTRL-Z"
SEND OK
+QSSLURC: "recv",1
As can be seen in the text above, the POST command was pasted into the terminal,
and the modem responded with "
SEND OK
"
indicating that the transmission succeeded.
Also note that the "
+QSSLURC: "recv",1
"
URC indicates that an HTTP response was
will detail how to read this response.
Another important item to note is the "
Content-Length: 115
" line. In this case, the
value of "
115
" indicates that 115 bytes of data are being sent through the socket. This
helps the endpoint know how many bytes to consider as data. It is crucial to ensure that
this number is updated whenever the data JSON is edited.
4.3 Reading an HTTP Response
To read an HTTP response, issue the following command:
AT+QSSLRECV=1
Where "
1
" is replaced by the number of the socket used for the SSL connection.
, the HTTP response is on the
next page.