• CoapRequest
  • CoapRequest Class

    Represents a request to a CoAP server. More...

    Header: #include <CoapRequest>

    Public Functions

    CoapRequest(const QUrl & url = QUrl())
    CoapPdu::ContentType contentType() const
    CoapPdu::MessageType messageType() const
    void setContentType(const CoapPdu::ContentType contentType = CoapPdu::TextPlain)
    void setMessageType(const CoapPdu::MessageType & messageType)
    void setUrl(const QUrl & url)
    QUrl url() const

    Detailed Description

    Represents a request to a CoAP server.

    Member Function Documentation

    CoapRequest::CoapRequest(const QUrl & url = QUrl())

    Constructs a CoAP request for the given url.

    CoapPdu::ContentType CoapRequest::contentType() const

    Returns the content format of the payload.

    See also setContentType().

    CoapPdu::MessageType CoapRequest::messageType() const

    Returns the message type of this CoapRequest.

    See also setMessageType().

    void CoapRequest::setContentType(const CoapPdu::ContentType contentType = CoapPdu::TextPlain)

    Sets the ContentType of this CoAP request to the given contentType. This method will only be used with the PUT and POST method and should describe the content format of the payload.

    See also contentType().

    void CoapRequest::setMessageType(const CoapPdu::MessageType & messageType)

    Sets the MessageType of this CoAP request to the given messageType.

    See also messageType().

    void CoapRequest::setUrl(const QUrl & url)

    Sets the URL of this CoAP request to the given url.

    See also url().

    QUrl CoapRequest::url() const

    Returns the URL of this CoAP request.

    See also setUrl().