Connection.createCoapRequest()

DESCRIPTION

Create a new CoAP request on this connection. Request must subsequently be executed. The returned CoapRequest object must be kep alive while in use.

DECLARATION

    public func createCoapRequest(method: String, path: String) throws -> CoapRequest 

PARAMETERS

method:
The CoAP method (either GET. POST, PUT or DELETE)
path:
The CoAP path (e.g., /heatpump/temperature)

THROWS ERRORS

ALLOCATION_ERROR:
if the request could not be created.