Skip to content

Commit 0a8b18a

Browse files
peknisnordicjm
authored andcommitted
doc: nRF Cloud REST lib: formatting fixes
Fixed a Kconfig option misspelling and other minor formatting issues. Signed-off-by: Pekka Niskanen <[email protected]>
1 parent 279e4a0 commit 0a8b18a

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

doc/nrf/libraries/networking/nrf_cloud_rest.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Various `nRF Cloud REST API endpoints <nRF Cloud REST API_>`_ are provided for t
2222
* Sending and receiving device messages.
2323
* Interacting with location services.
2424

25-
All of these functions operate on a :c:struct:`nrf_cloud_rest_context` structure that you must initialize and provide with your desired parameters.
25+
All of these functions operate on an :c:struct:`nrf_cloud_rest_context` structure that you must initialize and provide with your desired parameters.
2626
When each function returns, the context contains the status of the API call.
2727

2828
Authentication
@@ -31,24 +31,24 @@ Authentication
3131
Each HTTP/REST request must include a valid JSON Web Token (JWT) that serves as a proof of identity.
3232
Usually, these tokens are generated based on the `device credentials <nRF Cloud Security_>`_, and must be passed to the ``auth`` parameter of the :c:struct:`nrf_cloud_rest_context` structure.
3333
To generate a token, call the :c:func:`nrf_cloud_jwt_generate` function, or use the :ref:`lib_modem_jwt` library.
34-
Alternatively, if you have enabled the :kconfig:option:`NRF_CLOUD_REST_AUTOGEN_JWT` option (along with its dependencies), the nRF Cloud REST library generates a JWT automatically if one is not provided.
34+
Alternatively, if you have enabled the :kconfig:option:`CONFIG_NRF_CLOUD_REST_AUTOGEN_JWT` option (along with its dependencies), the nRF Cloud REST library generates a JWT automatically if one is not provided.
3535

3636
Socket management and reuse
3737
===========================
3838

3939
The socket used for each HTTP request is determined by the ``connect_socket`` parameter of the :c:struct:`nrf_cloud_rest_context` structure.
4040
If a valid socket file descriptor is passed, this socket is used.
41-
If -1 is passed, a socket will be created automatically.
41+
If ``-1`` is passed, a socket will be created automatically.
4242

4343
The selected socket can be reused depending on the passed-in value of the ``keep_alive`` property of the :c:struct:`nrf_cloud_rest_context` structure:
4444

45-
* If you set ``keep_alive`` to false, then the selected socket is closed after each request, and the ``connect_socket`` property is reset to ``-1``.
46-
* If you set ``keep_alive`` to true, the socket remains open and ``connect_socket`` remains unaltered, meaning the socket is reused on the next API call.
45+
* If you set ``keep_alive`` to false, the selected socket is closed after each request and the ``connect_socket`` property is reset to ``-1``.
46+
* If you set ``keep_alive`` to true, the socket remains open and ``connect_socket`` remains unaltered, meaning the socket is reused on the next API call.
4747

48-
However, if you set ``keep_alive`` to true, make sure that the socket has not been closed externally (for example, due to inactivity) before sending each request.
48+
However, if you set ``keep_alive`` to true, make sure that the socket has not been closed externally (for example, due to inactivity) before sending further requests.
4949
Otherwise, the request will be dropped.
5050

51-
There are two ways a timed out socket can manifest:
51+
Timeouts in the socket can happen in two ways:
5252

5353
* The socket may be closed immediately on timeout, causing ``-ENOTCONN`` to be returned by the next REST request function call, without reaching nRF Cloud.
5454
* The socket may be left open, allowing the next REST request to reach nRF Cloud, but the request is ignored and the socket is closed gracefully (FIN,ACK) with null HTTP response.
@@ -81,10 +81,10 @@ If an API call is unsuccessful, the called request function may return a variety
8181
For instance, ``-ENOTCONN`` if the socket was closed, or was never opened before the request was made.
8282
* If the remote endpoint closes the connection gracefully without giving a response (a null HTTP response), ``-ESHUTDOWN`` is returned.
8383
* If the remote endpoint responds with an unexpected HTTP status code (indicating request rejection), ``-EBADMSG`` is returned.
84-
Possible causes include, but are not limited to: bad endpoint, invalid request data, invalid JWT.
84+
Possible causes include, but are not limited to: bad endpoint, invalid request data, and invalid JWT.
8585
* If the response body is empty and the request expects response data, ``-ENODATA`` is returned.
8686
* If a heap allocation fails, ``-ENOMEM`` is returned.
87-
* Request formatting errors return ``-ETXTBSY``
87+
* Request formatting errors return ``-ETXTBSY``.
8888

8989
Some functions may have additional return values.
9090
These are documented on the function itself.

0 commit comments

Comments
 (0)