Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

enum System.​Net.​Http.​HttpVersionPolicy

Assembly: System.Net.Http

Specifies behaviors for selecting and negotiating the HTTP version for a request.

Values

RequestVersionOrLower
<para>Use the requested version or downgrade to a lower one. This is the default behavior.</para> <para>If the server supports the requested version, either negotiated via ALPN (H2) or advertised via Alt-Svc (H3), and a secure connection is being requested, the result is the <see cref="System.Net.Http.HttpRequestMessage.Version" />. Otherwise, the version downgrades to HTTP/1.1. This option does not allow use of a prenegotiated clear text connection, for example, H2C.</para>
RequestVersionOrHigher
<para>Use the highest available version, downgrading only to the requested version but not below.</para> <para>If the server supports a higher version than the requested version (either negotiated via ALPN (H2) or advertised via Alt-Svc (H3)) and a secure connection is requested, the result is the highest available version. Otherwise, the version downgrades to <see cref="System.Net.Http.HttpRequestMessage.Version" />. This option allows use of a prenegotiated clear text connection for the requested version but not for a higher version.</para>
RequestVersionExact
<para>Only use the requested version.</para> <para>This option allows for use of a prenegotiated clear text connection for the requested version.</para>