Класс 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 proxyUrl и типом сообщения type.
QCoapRequest &QCoapRequest::operator=(const QCoapRequest &other)
Создает копию other.
QCoapRequest::~QCoapRequest()
Удаляет QCoapRequest.
void QCoapRequest::enableObserve()
Устанавливает наблюдение на true для создания запроса наблюдения.
См. также isObserve().
bool QCoapRequest::isObserve() const
Возвращает true, если запрос является запросом наблюдения.
См. также 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.1/qcoaprequest.html