The ProtocolVersion property sets or returns the current
HTTP version number. It is used to determine how requests are
submitted to the server, as well as what header fields are required.
The default value for this property is "1.1", and should be
changed before any connection attempt is made by the client. It is
recommended you use this default value to ensure the broadest
compatibility with most servers and Windows platforms.
Setting this property to a value of "2.0" specifies
the client should use the HTTP/2 protocol standard defined in RFC 7540.
This protocol version is a significant change from previous versions and
can provide improved performance with header compression and optimizing
how requests are serviced. However, this version should only be used if
the server supports HTTP/2 and the client is running on Windows 10 (Build 1903)
or Windows Server 2019 or later versions. Earlier versions of the
Schannel SSP do not support the features required for a secure
HTTP/2 connection.
Setting this property to a value of "3.0" specifies the client
should use the HTTP/3 protocol standard defined in RFC 9114. This
protocol version is similar to earlier versions of the protocol in
terms the request methods and server responses, but the underlying
transport mechanism is significantly different. Instead of using TCP,
this version of the protocol uses multiplexed UDP connections designed
to reduce the overhead of TCP while maintaining reliability. If the
client or server does not support HTTP/3, the client will
automatically attempt to use an earlier version of the protocol.
You should only attempt to use HTTP/3 if you know the server
supports that version of the protocol. If the server does not support
HTTP/3, the client will wait for the timeout period to elapse to
determine the server is not responding to the HTTP/3 request and will
then attempt to use HTTP/2. If you specify HTTP/3 as the protocol
version and you are experiencing long delays for requests the
complete, the most likely reason is the server does not support the
QUIC protocol and every request is falling back to use HTTP/2 instead.
The minimum required platform for HTTP/3 support is Windows 11 21H2
and later builds or Windows Server 2022 or later.