QCoapRequest#

The QCoapRequest class holds a CoAP request. This request can be sent with QCoapClient . More

Inheritance diagram of PySide6.QtCoap.QCoapRequest

Synopsis#

Functions#

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

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

isObserve()

PySide6.QtCoap.QCoapRequest.isObserve()#
Return type

bool

Returns true if the request is an observe request.

See also

enableObserve()

PySide6.QtCoap.QCoapRequest.method()#
Return type

Method

Returns the method of the request.

PySide6.QtCoap.QCoapRequest.proxyUrl()#
Return type

PySide6.QtCore.QUrl

Returns the proxy URI of the request. The request shall be sent directly if this is invalid.

See also

setProxyUrl()

PySide6.QtCoap.QCoapRequest.setProxyUrl(proxyUrl)#
Parameters

proxyUrlPySide6.QtCore.QUrl

Sets the proxy URI of the request to the given proxyUrl.

See also

proxyUrl()

PySide6.QtCoap.QCoapRequest.setUrl(url)#
Parameters

urlPySide6.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

url()

PySide6.QtCoap.QCoapRequest.url()#
Return type

PySide6.QtCore.QUrl

Returns the target URI of the request.

See also

setUrl()