QHttpServerRequest Class

Encapsulates an HTTP request. More...

Header: #include <QHttpServerRequest>
CMake: find_package(Qt6 REQUIRED COMPONENTS HttpServer)
target_link_libraries(mytarget PRIVATE Qt6::HttpServer)
qmake: QT += httpserver
Since: Qt 6.4

Public Types

flags Methods

Public Functions

~QHttpServerRequest()
QByteArray body() const
QVariantMap headers() const
QHttpServerRequest::Method method() const
QUrlQuery query() const
QHostAddress remoteAddress() const
QUrl url() const
QByteArray value(const QByteArray &key) const

Detailed Description

API for accessing the different parameters of an incoming request.

Member Function Documentation

QHttpServerRequest::~QHttpServerRequest()

Destroys a QHttpServerRequest

QByteArray QHttpServerRequest::body() const

Returns the body of the request.

QVariantMap QHttpServerRequest::headers() const

Returns all the request headers.

QHttpServerRequest::Method QHttpServerRequest::method() const

Returns the method of the request.

QUrlQuery QHttpServerRequest::query() const

Returns the query in the request.

QHostAddress QHttpServerRequest::remoteAddress() const

Returns the address of the origin host of the request.

QUrl QHttpServerRequest::url() const

Returns the URL the request asked for.

QByteArray QHttpServerRequest::value(const QByteArray &key) const

Returns the combined value of all headers with the named key.