This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
QCoapRequest contains data needed to make CoAP frames that can be sent to the URL it holds.
- class PySide6.QtCoap.QCoapRequest(other)#
PySide6.QtCoap.QCoapRequest([url=QUrl()[, type=QCoapMessage.Type.NonConfirmable[, proxyUrl=QUrl()]]])
Constructs a copy of the
QCoapRequest object with the target
url, the proxy URL
proxyUrl and the
type of the message.
QCoapRequest from a string literal
Sets the observe to
true to make an observe request.
- Return type:
true if the request is an observe request.
Returns the method of the request.
Returns the proxy URI of the request. The request shall be sent directly if this is invalid.
Sets the proxy URI of the request to the given
Sets the target URI of the request to the given
If not indicated, the scheme of the URL will default to ‘coap’, and its port will default to 5683.
Returns the target URI of the request.