nabto_client_coap_new()

DESCRIPTION

Create a new coap request/response context on the given connection.

DECLARATION

NABTO_CLIENT_DECL_PREFIX NabtoClientCoap* NABTO_CLIENT_API
nabto_client_coap_new(NabtoClientConnection* connection, const char* method, const char* path)

PARAMETERS

connection:
[in] The connection to make the CoAP request on, the connection needs to be kept alive until the request has been freed.
method:
[in] The CoAP method designator string. One of: GET, POST, PUT, DELETE.
path:
[in] The URI path element of the resource being requested. It has to start with a '/' character. The string "/" is the root path.

RETURNS

The created CoAP context, NULL if it could not be created (including if method is invalid).