QCoapRequest#
The QCoapRequest class holds a CoAP request. This request can be sent with QCoapClient . More…
Synopsis#
Functions#
- def - enableObserve()
- def - isObserve()
- def - method()
- def - proxyUrl()
- def - setProxyUrl(proxyUrl)
- def - setUrl(url)
- 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 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()]]]) - PySide6.QtCoap.QCoapRequest(url[, type=QCoapMessage.Type.NonConfirmable]) - Parameters:
- proxyUrl – - PySide6.QtCore.QUrl
- other – - PySide6.QtCoap.QCoapRequest
- type – - Type
- url – - PySide6.QtCore.QUrl
 
 
Constructs a copy of the other QCoapRequest .
Constructs a QCoapRequest object with the target url, the proxy URL proxyUrl and the type of the message.
Constructs a QCoapRequest from a string literal
- PySide6.QtCoap.QCoapRequest.enableObserve()#
Sets the observe to true to make an observe request.
See also
- PySide6.QtCoap.QCoapRequest.isObserve()#
- Return type:
- bool 
 
Returns true if the request is an observe request.
See also
Returns the method of the request.
- PySide6.QtCoap.QCoapRequest.proxyUrl()#
- Return type:
 
Returns the proxy URI of the request. The request shall be sent directly if this is invalid.
See also
- PySide6.QtCoap.QCoapRequest.setProxyUrl(proxyUrl)#
- Parameters:
- proxyUrl – - PySide6.QtCore.QUrl
 
Sets the proxy URI of the request to the given proxyUrl.
See also
- PySide6.QtCoap.QCoapRequest.setUrl(url)#
- Parameters:
- url – - PySide6.QtCore.QUrl
 
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
- PySide6.QtCoap.QCoapRequest.url()#
- Return type:
 
Returns the target URI of the request.
See also