QHttp2Configuration Class
The QHttp2Configuration class controls HTTP/2 parameters and settings. More...
| Header: | #include <QHttp2Configuration> |
| qmake: | QT += network |
| Since: | Qt 5.14 |
This class was introduced in Qt 5.14.
Note: All functions in this class are reentrant.
Detailed Description
QHttp2Configuration controls HTTP/2 parameters and settings that QNetworkAccessManager will use to send requests and process responses when the HTTP/2 protocol is enabled.
The HTTP/2 parameters that QHttp2Configuration currently supports include:
- The session window size for connection-level flow control. Will be sent to a remote peer when needed as 'WINDOW_UPDATE' frames on the stream with an identifier 0.
- The stream receiving window size for stream-level flow control. Sent as 'SETTINGS_INITIAL_WINDOW_SIZE' parameter in the initial SETTINGS frame and, when needed, 'WINDOW_UPDATE' frames will be sent on streams that QNetworkAccessManager opens.
- The maximum frame size. This parameter limits the maximum payload a frame coming from the remote peer can have. Sent by QNetworkAccessManager as 'SETTINGS_MAX_FRAME_SIZE' parameter in the initial 'SETTINGS' frame.
- The server push. Allows to enable or disable server push. Sent as 'SETTINGS_ENABLE_PUSH' parameter in the initial 'SETTINGS' frame.
The QHttp2Configuration class also controls if the header compression algorithm (HPACK) is additionally using Huffman coding for string compression.
Note: The configuration must be set before the first request was sent to a given host (and thus an HTTP/2 session established).
See also QNetworkRequest::setHttp2Configuration(), QNetworkRequest::http2Configuration(), and QNetworkAccessManager.