CoapRequest.setRequestPayload()
DESCRIPTION
Set payload and content format for the payload.
DECLARATION
public func setRequestPayload(contentFormat: UInt16, data: Data) throws
PARAMETERS
contentFormat:
- See https://www.iana.org/assignments/core-parameters/core-parameters.xhtml, some often used values are defined in ContentFormat.
data:
- Data for the request encoded as specified in the
contentFormat
parameter.
ERRORS
Throws the following errors:
NabtoEdgeClientError.FAILED:
- if payload could not be set
RETURN VALUES
None.
EXAMPLES
None.