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.
THROWS ERRORS
NabtoEdgeClientError.FAILED:
- if payload could not be set