ot::Coap::CoapBase::NewNonConfirmablePostMessage() method
Allocates and initializes a new CoAP Non-confirmable Post message with normal priority level. The CoAP header is initialized as `kTypeNonConfirmable` and `kCodePost` with a given URI and a randomly generated token (of default length). This method also sets the payload marker (calling `SetPayloadMarker()`). Even if message has no payload, calling `SetPayloadMarker()` is harmless, since `SendMessage()` will check and remove the payload marker when there is no payload.
Return value
A pointer to the message or `nullptr` if failed to allocate message.
ot::Coap::CoapBase::NewNonConfirmablePostMessage() calls 2 functions:
![]()
ot::Coap::CoapBase::NewNonConfirmablePostMessage()
ot::Coap::CoapBase::NewNonConfirmablePostMessage() reads 1 variable and writes 1 variable:
![]()
ot::Coap::CoapBase::NewNonConfirmablePostMessage()