RequestContext
A request as a resource handler sees it: verified by message security, reassembled from Block1 transfers, and with who sent it. This is the server's application model, the counterpart of the client's CoapRequest: method, path, query, options and payload, without the messaging-layer fields (type, Message ID, token), which differ by transport and mean nothing to a handler.
Authorize on either identity (architecture rule 4): peerIdentity is what DTLS or TLS authenticated for the hop, securityIdentity what OSCORE authenticated end to end.
Properties
True when the handler runs to produce an Observe notification rather than to answer a request.
The request message: inner (decrypted) for OSCORE, with the whole body for Block1 transfers, and with the messaging-layer fields of the message it came in. Plumbing for kcoap's own modules; a handler reads the properties of this class instead.
The size of the request body in bytes.
What channel security authenticated for the hop: DTLS for Endpoint.Secure peers, TLS on connections.
The resource the request is for.
The message-security identity, or null for an unprotected request.
Functions
Sends an Empty ACK now, so a slow handler's response goes separately (RFC 7252 §5.2.2). The server does this by itself after dev.kcoap.coap.stack.CoapEndpointConfig.separateResponseDelay; call it when the handler knows in advance that it will take long. No effect for Non-confirmable requests and notifications.
The request body as UTF-8 text.
Evaluates If-Match and If-None-Match (RFC 7252 §5.10.8) against the resource's current state. A handler that returns 4.12 Precondition Failed when this is false, and lists both options in CoapResource.recognizedOptions, implements conditional requests.