8000 HTTP Version Selection by aik-jahoda · Pull Request #4870 · dotnet/dotnet-api-docs · GitHub
[go: up one dir, main page]

Skip to content

HTTP Version Selection #4870

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions xml/System.Net.Http/HttpClient.xml
Original file line number Diff line number Diff line change
Expand Up @@ -541,9 +541,15 @@ The `DefaultRequestVersion` property can be changed as long as the <xref:System.
<ReturnType>System.Net.Http.HttpVersionPolicy</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<summary>Gets or sets the default version policy for implicitly created requests in convenience methods, for example, <see cref="M:System.Net.Http.HttpClient.GetAsync(System.String)" /> and <see cref="M:System.Net.Http.HttpClient.PostAsync(System.String,System.Net.Http.HttpContent)" />.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks
This property has no effect on any of the <xref:System.Net.Http.HttpClient.Send%2A> or <xref:System.Net.Http.HttpClient.SendAsync%2A> overloads that accept an <xref:System.Net.Http.HttpRequestMessage?displayProperty=nameWithType>.
]]></format>
</remarks>
</Docs>
</Member>
<MemberGroup MemberName="DeleteAsync">
Expand Down
2 changes: 1 addition & 1 deletion xml/System.Net.Http/HttpRequestMessage.xml
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ The following table lists the default message version based on the version of .N
<ReturnType>System.Net.Http.HttpVersionPolicy</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<summary>Gets or sets the policy that determines how <see cref="System.Net.Http.HttpRequestMessage.Version" /> is interpreted and how the final HTTP version is negotiated with the server.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
Expand Down
35 changes: 31 additions & 4 deletions xml/System.Net.Http/HttpVersionPolicy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<BaseTypeName>System.Enum</BaseTypeName>
</Base>
<Docs>
<summary>To be added.</summary>
<summary>Specifies behaviors for selecting and negotiating the HTTP version for a request.</summary>
<remarks>To be added.</remarks>
</Docs>
<Members>
Expand All @@ -34,7 +34,15 @@
</ReturnValue>
<MemberValue>2</MemberValue>
<Docs>
<summary>To be added.</summary>
<summary>Only use the requested version. Throws an <see cref="HttpRequestException" /> if a connection with the exact version cannot be established.</summary>
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks
This option allows for use of a prenegotiated clear text connection for the requested version.

]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="RequestVersionOrHigher">
Expand All @@ -54,7 +62,17 @@
</ReturnValue>
<MemberValue>1</MemberValue>
<Docs>
<summary>To be added.</summary>
<summary>Use the highest available version, downgrading only to the requested version but not below. Throws an <see cref="HttpRequestException" /> if a connection with higher or equal version cannot be established.</summary>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here with exception

<remarks>
<format type="text/markdown"><![CDATA[

## Remarks
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="HttpRequestMessage.Version" />.

This option allows use of a prenegotiated clear text connection for the requested version but not for a higher version.

]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="RequestVersionOrLower">
Expand All @@ -74,7 +92,16 @@
</ReturnValue>
<MemberValue>0</MemberValue>
<Docs>
<summary>To be added.</summary>
<summary>Use the requested version or downgrade to a lower one. This is the default behavior.</summary>
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks
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="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.
]]></format>
</remarks>
</Docs>
</Member>
</Members>
Expand Down
0