-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add remark about timeout scope on HttpCompletionOptions enum #10750
Add remark about timeout scope on HttpCompletionOptions enum #10750
Conversation
Tagging subscribers to this area: @dotnet/ncl |
Learn Build status updates of commit 175f557:
|
File | Status | Preview URL | Details |
---|---|---|---|
xml/System.Net.Http/HttpCompletionOption.xml | View | Details |
xml/System.Net.Http/HttpCompletionOption.xml
- Line 0, Column 0: [Warning: xref-not-found - See documentation]
Cross reference not found: 'HttpCompletionOption'.
- Line 0, Column 0: [Warning: disallowed-html-tag - See documentation]
HTML tag 'see' isn't allowed. Replace it with approved Markdown or escape the brackets if the content is a placeholder.
- Line 0, Column 0: [Warning: disallowed-html-tag - See documentation]
HTML tag 'see' isn't allowed. Replace it with approved Markdown or escape the brackets if the content is a placeholder.
- Line 0, Column 0: [Warning: disallowed-html-tag - See documentation]
HTML tag 'see' isn't allowed. Replace it with approved Markdown or escape the brackets if the content is a placeholder.
For more details, please refer to the build report.
Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.
For any questions, please:
- Try searching the learn.microsoft.com contributor guides
- Post your question in the Learn support channel
Learn Build status updates of commit 87b4042:
|
File | Status | Preview URL | Details |
---|---|---|---|
xml/System.Net.Http/HttpCompletionOption.xml | View | Details |
xml/System.Net.Http/HttpCompletionOption.xml
- Line 0, Column 0: [Warning: xref-not-found - See documentation]
Cross reference not found: 'HttpCompletionOption'.
For more details, please refer to the build report.
Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.
For any questions, please:
- Try searching the learn.microsoft.com contributor guides
- Post your question in the Learn support channel
snippets/csharp/System.Net.Http/HttpCompletionOption/HttpCompletionOptionSnippets.cs
Outdated
Show resolved
Hide resolved
Learn Build status updates of commit 1a44c31:
|
File | Status | Preview URL | Details |
---|---|---|---|
xml/System.Net.Http/HttpCompletionOption.xml | View | Details | |
snippets/csharp/System.Net.Http/HttpCompletionOption/HttpCompletionOptionSnippets.cs | ✅Succeeded | View | |
snippets/csharp/System.Net.Http/HttpCompletionOption/HttpCompletionOptionSnippets.csproj | ✅Succeeded | ||
snippets/csharp/System.Net.Http/HttpCompletionOption/Program.cs | ✅Succeeded |
xml/System.Net.Http/HttpCompletionOption.xml
- Line 0, Column 0: [Warning: xref-not-found - See documentation]
Cross reference not found: 'HttpCompletionOption'.
For more details, please refer to the build report.
Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.
For any questions, please:
- Try searching the learn.microsoft.com contributor guides
- Post your question in the Learn support channel
Learn Build status updates of commit 1c8336f: ✅ Validation status: passed
For more details, please refer to the build report. For any questions, please:
|
@dotnet-policy-service agree company="Microsoft" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the help here and sorry about the delayed review
snippets/csharp/System.Net.Http/HttpCompletionOption/HttpCompletionOptionSnippets.cs
Outdated
Show resolved
Hide resolved
… and rewording Co-authored-by: Miha Zupan <mihazupan.zupan1@gmail.com>
snippets/csharp/System.Net.Http/HttpCompletionOption/HttpCompletionOptionSnippets.csproj
Outdated
Show resolved
Hide resolved
Learn Build status updates of commit 04c37e4: ✅ Validation status: passed
For more details, please refer to the build report. For any questions, please:
|
Learn Build status updates of commit 95bbed4: ✅ Validation status: passed
For more details, please refer to the build report. For any questions, please:
|
Summary
Update the HttpCompletionOption enum docs to clarify its effect on the HttpClient timeout.
Issue
HttpCompletionOptions effectively affect the scope of the timeout on HttpClient operations. The timeout always applies up until the HTTP client operations complete. Because HttpCompletionOptions control when the operations complete, they effectively change when the timeout stops applying. This might be implicit and obvious in hindsight, but it's routinely overlooked by developers. This MVP article is frequently cited by developers using ResponseHeadersRead, yet the article mentions nothing about the timeout scope: https://www.stevejgordon.co.uk/using-httpcompletionoption-responseheadersread-to-improve-httpclient-performance-dotnet
Solution
Update the HttpCompletionOption enum docs to explicitly call this behavior out.