QHttp1Configuration Class

The QHttp1Configuration class controls HTTP/1 parameters and settings. More...

Header: #include <QHttp1Configuration>
CMake: find_package(Qt6 REQUIRED COMPONENTS Network)
target_link_libraries(mytarget PRIVATE Qt6::Network)
qmake: QT += network
Since: Qt 6.5

Note: All functions in this class are reentrant.

Public Functions

QHttp1Configuration()
QHttp1Configuration(const QHttp1Configuration &other)
~QHttp1Configuration()
qsizetype numberOfConnectionsPerHost() const
void setNumberOfConnectionsPerHost(qsizetype number)
QHttp1Configuration &operator=(const QHttp1Configuration &other)

Detailed Description

QHttp1Configuration controls HTTP/1 parameters and settings that QNetworkAccessManager will use to send requests and process responses.

Note: The configuration must be set before the first request was sent to a given host (and thus an HTTP/1 session established).

See also QNetworkRequest::setHttp1Configuration(), QNetworkRequest::http1Configuration(), and QNetworkAccessManager.

Member Function Documentation

QHttp1Configuration::QHttp1Configuration()

Default constructs a QHttp1Configuration object.

QHttp1Configuration::QHttp1Configuration(const QHttp1Configuration &other)

Copy-constructs this QHttp1Configuration.

[noexcept] QHttp1Configuration::~QHttp1Configuration()

Destructor.

qsizetype QHttp1Configuration::numberOfConnectionsPerHost() const

Returns the number of connections used per http(s) host:port combination. The default is six (6).

See also setNumberOfConnectionsPerHost.

void QHttp1Configuration::setNumberOfConnectionsPerHost(qsizetype number)

Sets the number of connections (minimum: 1; maximum: 255) used per http(s) host:port combination to number.

If number is ≤ 0, does nothing. If number is > 255, 255 is used.

See also numberOfConnectionsPerHost.

QHttp1Configuration &QHttp1Configuration::operator=(const QHttp1Configuration &other)

Copy-assigns other to this QHttp1Configuration.