Commit 22d17b0
authored
Fix (Http)WebRequest (Begin|End)GetResponse samples (dotnet#11030)
These samples were not handling the `asyncResult.CompletedSynchronously == true` case correctly: changing the sample code to use smaller buffer leads to stack overflow because of recursion on synchronous completions.
Besides the fix there the PR adds some consolidation:
- Cleanup and (somewhat) modernize the sample code
- Remove the Timer-based custom timeout implementation, use `WebRequest.Timeout` instead
- Collapse various samples into one sample
- Unifiy the `HttpWebRequest` and `WebRequest` samples since they are practically identical
- Delete CPP and VB samples given we don't have the capacity and the intention to maintain them.1 parent f9285cf commit 22d17b0
File tree
12 files changed
+159
-1101
lines changed- snippets
- cpp/VS_Snippets_Remoting
- System.Net.HttpWebRequest.BeginGetResponse/CPP
- WebRequest_BeginGetResponse/CPP
- csharp/System.Net
- HttpWebRequest
- Abort
- EndGetResponse
- WebRequest/BeginGetResponse
- visualbasic/VS_Snippets_Remoting
- HttpWebRequest_BeginGetResponse/VB
- System.Net.HttpWebRequest.BeginGetResponse/VB
- xml/System.Net
12 files changed
+159
-1101
lines changedLines changed: 0 additions & 195 deletions
This file was deleted.
Lines changed: 0 additions & 173 deletions
This file was deleted.
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
0 commit comments