post

suspend fun post(uri: CoapUri, payload: ByteArray = ByteArray(0), contentFormat: Int? = null, configure: CoapRequest.Builder.() -> Unit = {}): CoapResponse(source)

POST (RFC 7252 §5.8.2) of payload in contentFormat to uri; large bodies go in Block1 blocks.


suspend fun post(uri: String, payload: ByteArray = ByteArray(0), contentFormat: Int? = null, configure: CoapRequest.Builder.() -> Unit = {}): CoapResponse(source)

POST to the CoAP URI uri.