REST client

The REST client library provides means for performing REST requests.

Overview

This library creates a socket with TLS when requested. It uses Zephyr’s HTTP client library to send HTTP requests and receive HTTP responses. When using this library, the rest_client_req_context structure is populated and passed to the rest_client_request() function together with the rest_client_resp_context structure, which will contain the response data.

Configuration

To use the REST client library, enable the CONFIG_REST_CLIENT Kconfig option.

You can configure the following options to adjust the behavior of the library:

Limitations

  • Executing REST request is a blocking operation. The calling thread is blocked until the request has completed.

  • REST client only works in the default PDP context.

  • REST client do not allow selection of IPV4 or IPV6 but it works on what DNS returns for name query.

API documentation

Header file: include/net/rest_client.h
Source files: subsys/net/lib/rest_client
REST client library