Класс QCoapRequest
Класс QCoapRequest хранит запрос CoAP. Этот запрос может быть отправлен с помощью QCoapClient. Подробнее...
| Заголовок: | #include <QCoapRequest> |
| qmake: | QT += coap |
| Наследует: | QCoapMessage |
Примечание: Все функции в этом классе являются взаимоисключающими.
Открытые функции
| 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 |
Подробное описание
QCoapRequest содержит данные, необходимые для создания фреймов CoAP, которые могут быть отправлены на указанный URL.
См. также QCoapClient, QCoapReply и QCoapResourceDiscoveryReply.
Документация по функциям-членам
QCoapRequest::QCoapRequest(const QCoapRequest &other)
Создает копию QCoapRequest other.
QCoapRequest::QCoapRequest(const char *url, QCoapMessage::Type type = Type::NonConfirmable)
Создает QCoapRequest из строкового литерала.
QCoapRequest::QCoapRequest(const QUrl &url = QUrl(), QCoapMessage::Type type = Type::NonConfirmable, const QUrl &proxyUrl = QUrl())
Создает объект QCoapRequest с целевым URL url, прокси-URL proxyUrl и типом сообщения type.
QCoapRequest &QCoapRequest::operator=(const QCoapRequest &other)
Создает копию other.
QCoapRequest::~QCoapRequest()
Удаляет QCoapRequest.
void QCoapRequest::enableObserve()
Устанавливает observe в true для создания запроса observe.
См. также isObserve().
bool QCoapRequest::isObserve() const
Возвращает true, если запрос является запросом observe.
См. также enableObserve().
QtCoap::Method QCoapRequest::method() const
Возвращает метод запроса.
QUrl QCoapRequest::proxyUrl() const
Возвращает прокси-URI запроса. Запрос будет отправлен напрямую, если это значение недействительно.
См. также setProxyUrl().
void QCoapRequest::setProxyUrl(const QUrl &proxyUrl)
Устанавливает прокси-URI запроса на заданный proxyUrl.
См. также proxyUrl().
void QCoapRequest::setUrl(const QUrl &url)
Устанавливает целевой URI запроса на заданный url.
Если не указано иное, схема URL по умолчанию будет 'coap', а порт — 5683.
См. также url().
QUrl QCoapRequest::url() const
Возвращает целевой URI запроса.
См. также setUrl().
© The Qt Company Ltd
Licensed under the GNU Free Documentation License, Version 1.3.
https://doc.qt.io/qt-6.2/qcoaprequest.html