nabto_client_coap_get_response_payload()

DESCRIPTION

Get the response data.

The payload is available until nabto_client_coap_free is called.

DECLARATION

NABTO_CLIENT_DECL_PREFIX NabtoClientError NABTO_CLIENT_API
nabto_client_coap_get_response_payload(NabtoClientCoap* coap, void** payload, size_t* payloadLength)

PARAMETERS

coap:
[in] the coap request response object.
payload:
[out] start of the payload.
payloadLength:
[out] length of the payload

RETURNS

  • NABTO_CLIENT_EC_OK: if a payload exists and payload and payloadLength is set appropriately.
  • NABTO_CLIENT_EC_NO_DATA: if the response does not have a payload
  • NABTO_CLIENT_EC_INVALID_STATE: if no response is ready yet.