Skip to content
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

HttpClient: remove redundant and outdated runtime config switch information #5028

Merged
merged 5 commits into from
Oct 30, 2020

Conversation

antonfirsov
Copy link
Member

Removes redundant and outdated (!) information about runtime configuration options for HttpClient, referencing the options docs page instead.

Related PR updating the options docs: dotnet/docs#21197

@antonfirsov antonfirsov requested review from a team October 23, 2020 15:22
@opbld32
Copy link

opbld32 commented Oct 23, 2020

Docs Build status updates of commit 3103a27:

✅ Validation status: passed

File Status Preview URL Details
xml/System.Net.Http/HttpClient.xml ✅Succeeded View

For more details, please refer to the build report.

Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.

For any questions, please:

Copy link
Contributor

@gewarren gewarren left a comment

Choose a reason for hiding this comment

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

Thanks for updating this!

xml/System.Net.Http/HttpClient.xml Outdated Show resolved Hide resolved
xml/System.Net.Http/HttpClient.xml Outdated Show resolved Hide resolved
antonfirsov and others added 2 commits October 23, 2020 18:57
Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
```

- By defining an environment variable named `DOTNET_SYSTEM_NET_HTTP_USESOCKETSHTTPHANDLER` and setting it to either `false` or 0.
Certain aspects of <xref:System.Net.Http.HttpClient>'s behavior are customizable through [Run-time configuration options](https://docs.microsoft.com/en-us/dotnet/core/run-time-config/networking). However, the behavior of these switches differs through .NET versions. For example, in .NET Core 2.1 - 3.1, you can configure whether <xref:System.Net.Http.SocketsHttpHandler> is used by default, but that option is no longer available starting in .NET 5.0.
Copy link
Member Author

Choose a reason for hiding this comment

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

@gewarren is this the right way to reference conceptual docs?

[Run-time configuration options](https://docs.microsoft.com/en-us/dotnet/core/run-time-config/networking)

Copy link
Contributor

Choose a reason for hiding this comment

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

No, it should be [Run-time configuration options](/dotnet/core/run-time-config/networking). Thanks for checking.

@opbld31
Copy link

opbld31 commented Oct 23, 2020

Docs Build status updates of commit c85d665:

✅ Validation status: passed

File Status Preview URL Details
xml/System.Net.Http/HttpClient.xml ✅Succeeded View

For more details, please refer to the build report.

Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.

For any questions, please:

@opbld30
Copy link

opbld30 commented Oct 23, 2020

Docs Build status updates of commit 0c2706b:

✅ Validation status: passed

File Status Preview URL Details
xml/System.Net.Http/HttpClient.xml ✅Succeeded View

For more details, please refer to the build report.

Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.

For any questions, please:

@opbld32
Copy link

opbld32 commented Oct 26, 2020

Docs Build status updates of commit de79bac:

✅ Validation status: passed

File Status Preview URL Details
xml/System.Net.Http/HttpClient.xml ✅Succeeded View

For more details, please refer to the build report.

Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.

For any questions, please:

```

- By defining an environment variable named `DOTNET_SYSTEM_NET_HTTP_USESOCKETSHTTPHANDLER` and setting it to either `false` or 0.
Certain aspects of <xref:System.Net.Http.HttpClient>'s behavior are customizable through [Run-time configuration options](/dotnet/core/run-time-config/networking). However, the behavior of these switches differs through .NET versions. For example, in .NET Core 2.1 - 3.1, you can configure whether <xref:System.Net.Http.SocketsHttpHandler> is used by default, but that option is no longer available starting in .NET 5.0.
Copy link
Member

Choose a reason for hiding this comment

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

Should the UseSocketsHttpHandler switch be also marked as available only till .NET Core 3.1 in the referenced docs https://docs.microsoft.com/en-us/dotnet/core/run-time-config/networking?

And would it make sense to mention that using WinHttpHandler is still possible via OOB nuget package (manually setting it to HttpClient ctor)?

Copy link
Member Author

Choose a reason for hiding this comment

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

Should the UseSocketsHttpHandler switch be also marked as available only till .NET Core 3.1 in the referenced docs https://docs.microsoft.com/en-us/dotnet/core/run-time-config/networking?

I'm not a big fan of documenting the same thing in redundant ways, so in this PR I'm replacing the detailed docs of UseSocketsHttpHandler in HttpClient's remarks section by a reference to the runtime switches page, which is being updated in dotnet/docs#21197. Does this answer your question, or did you mean something different?

And would it make sense to mention that using WinHttpHandler is still possible via OOB nuget package (manually setting it to HttpClient ctor)?

Addressed in e2285e6

Copy link
Member

Choose a reason for hiding this comment

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

No, that's perfect! I wasn't aware of the other PR and the existing note. Thank you!

@opbld32
Copy link

opbld32 commented Oct 26, 2020

Docs Build status updates of commit e2285e6:

✅ Validation status: passed

File Status Preview URL Details
xml/System.Net.Http/HttpClient.xml ✅Succeeded View

For more details, please refer to the build report.

Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.

For any questions, please:

@antonfirsov antonfirsov merged commit 70dc619 into master Oct 30, 2020
@antonfirsov antonfirsov deleted the antonfirsov-httpclient-removeredundancy branch October 30, 2020 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants