PySide6.QtCoap.QCoapRequest¶
- class QCoapRequest¶
The
QCoapRequest
class holds a CoAP request. This request can be sent withQCoapClient
. 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
QCoapRequest
contains 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
QCoapRequest
from a string literal- __init__([url=QUrl()[, type=QCoapMessage.Type.NonConfirmable[, proxyUrl=QUrl()]]])
Constructs a
QCoapRequest
object with the targeturl
, the proxy URLproxyUrl
and thetype
of the message.- enableObserve()¶
Sets the observe to
true
to make an observe request.See also
- isObserve()¶
- Return type:
bool
Returns
true
if 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