PySide6.QtCoap.QCoapRequest¶
- class QCoapRequest¶
- The - QCoapRequestclass holds a CoAP request. This request can be sent with- QCoapClient. More…- Synopsis¶- Methods¶- def - __init__()
- def - enableObserve()
- def - isObserve()
- def - method()
- def - proxyUrl()
- def - setProxyUrl()
- def - setUrl()
- def - url()
 - Note - 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 - Detailed Description¶- The - QCoapRequestcontains data needed to make CoAP frames that can be sent to the URL it holds.- __init__(other)¶
- Parameters:
- other – - QCoapRequest
 
 - Constructs a copy of the - other- QCoapRequest.- __init__(url[, type=QCoapMessage.Type.NonConfirmable])
- Parameters:
- url – str 
- type – - Type
 
 
 - Constructs a - QCoapRequestfrom a string literal- __init__([url=QUrl()[, type=QCoapMessage.Type.NonConfirmable[, proxyUrl=QUrl()]]])
 - Constructs a - QCoapRequestobject with the target- url, the proxy URL- proxyUrland the- typeof the message.- enableObserve()¶
 - Sets the observe to - trueto make an observe request.- See also - isObserve()¶
- Return type:
- bool 
 
 - Returns - trueif the request is an observe request.- See also - Returns the method of the request. - Returns the proxy URI of the request. The request shall be sent directly if this is invalid. - See also - Sets the proxy URI of the request to the given - proxyUrl.- See also - Sets the target URI of the request to the given - url.- If not indicated, the scheme of the URL will default to ‘coap’, and its port will default to 5683. - See also - Returns the target URI of the request. - See also