request

suspend fun request(request: CoapRequest): CoapResponse(source)

Sends request and returns its whole response: with Q-Block (RFC 9177) where CoapClientConfig.qBlock allows it and the server supports it, otherwise with Block1 and Block2 (RFC 7959) where the body needs them.


suspend fun request(method: CoapCode, uri: CoapUri, configure: CoapRequest.Builder.() -> Unit = {}): CoapResponse(source)

Sends a method request to uri, set up by configure.