nabto_device_virtual_coap_request_set_payload()

DESCRIPTION

Set the payload of a given virtual CoAP request.

DECLARATION

    NABTO_DEVICE_DECL_PREFIX NabtoDeviceError NABTO_DEVICE_API
        nabto_device_virtual_coap_request_set_payload(NabtoDeviceVirtualCoapRequest* request,
            const void* data,
            size_t dataSize)

PARAMETERS

request:
[in] The request on which to set the payload
data:
[in] The payload to set. The payload is copied into the request.
dataSize:
[in] The length of the payload in bytes

RETURNS

  • NABTO_DEVICE_EC_OK: on success
  • NABTO_DEVICE_EC_OUT_OF_MEMORY: if payload could not be allocated