nabto_client_coap_set_request_payload()

DESCRIPTION

Set payload and content format for the payload.

DECLARATION

NABTO_CLIENT_DECL_PREFIX NabtoClientError NABTO_CLIENT_API
nabto_client_coap_set_request_payload(NabtoClientCoap* coap, uint16_t contentFormat, const void* payload, size_t payloadLength)

PARAMETERS

coap:
The CoAP request to set request payload and content format on.
contentFormat:
See https://www.iana.org/assignments/core-parameters/core-parameters.xhtml, some often used values are defined in NabtoClientCoapContentFormat.
payload:
Data for the request encoded as specified in the contentFormat parameter.
payloadLength:
Length of the payload in bytes.

RETURN VALUES

Returns NABTO_CLIENT_OK iff the payload and content format were successfully set.

EXAMPLES

None.