The QCoapRequest class holds a CoAP request. This request can be sent with QCoapClient. More...
Header: | #include <QCoapRequest> |
qmake: | QT += coap |
Inherits: | QCoapMessage |
Note: All functions in this class are reentrant.
QCoapRequest(const QCoapRequest &other) | |
QCoapRequest(const char *url, QCoapMessage::Type type = Type::NonConfirmable) | |
QCoapRequest(const QUrl &url = QUrl(), QCoapMessage::Type type = Type::NonConfirmable, const QUrl &proxyUrl = QUrl()) | |
QCoapRequest & | operator=(const QCoapRequest &other) |
~QCoapRequest() | |
void | enableObserve() |
bool | isObserve() const |
QtCoap::Method | method() const |
QUrl | proxyUrl() const |
void | setProxyUrl(const QUrl &proxyUrl) |
void | setUrl(const QUrl &url) |
QUrl | url() const |
The QCoapRequest contains data needed to make CoAP frames that can be sent to the URL it holds.
See also QCoapClient, QCoapReply, and QCoapResourceDiscoveryReply.
Constructs a copy of the other QCoapRequest.
Constructs a QCoapRequest from a string literal
Constructs a QCoapRequest object with the target url, the proxy URL proxyUrl and the type of the message.
Creates a copy of other.
Destroys the QCoapRequest.
Sets the observe to true
to make an observe request.
See also isObserve().
Returns true
if the request is an observe request.
See also enableObserve().
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 setProxyUrl().
Sets the proxy URI of the request to the given proxyUrl.
See also proxyUrl().
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().
Returns the target URI of the request.
See also setUrl().
© The Qt Company Ltd
Licensed under the GNU Free Documentation License, Version 1.3.
https://doc.qt.io/qt-6.2/qcoaprequest.html