Thanks. Although I don't understand your arguments that you don't have to keep all content in the memory and you can start working with the data faster. You still keep all the content in the memory at your breakpoints ;)
You are most welcome. Yes, breakpoints are here just for the example sake but with the completition mode I use in this example, I return the control to the caller earlier, as soon as the response headers have been fully read. The body of the response may not be fully received at this point. So it is definitely a faster process. When using this option, we avoid the intermediate MemoryStream buffer, instead of getting the content directly from the stream exposed on the Socket. This avoids unnecessary allocations which is a goal in highly optimised situations. Another benefit in regards to performance is that we can begin working with the stream of data more quickly. In the default mode, when ResponseContentRead is used, first the content is buffered, then the method returns control to the calling method. With ResponseHeadersRead, we can begin reading the data from the stream, even while it is being sent over the network.
Thanks a lot for the awesome video the channel should be called Code A-Maze-ng I hope you talk about Using Compression With HttpClient in your upcoming videos
Thank you all for watching and for your support.
►► If you want to check out all our courses you can do that here: courses.code-maze.com/courses/
When possible, make a video on Hangfire, thanks.
Good suggestion, thanks.
Great tutorial. Thank you :)
You are most welcome. Thank you for watching.
Thanks. Although I don't understand your arguments that you don't have to keep all content in the memory and you can start working with the data faster. You still keep all the content in the memory at your breakpoints ;)
You are most welcome. Yes, breakpoints are here just for the example sake but with the completition mode I use in this example, I return the control to the caller earlier, as soon as the response headers have been fully read. The body of the response may not be fully received at this point. So it is definitely a faster process.
When using this option, we avoid the intermediate MemoryStream buffer, instead of getting the content directly from the stream exposed on the Socket. This avoids unnecessary allocations which is a goal in highly optimised situations.
Another benefit in regards to performance is that we can begin working with the stream of data more quickly. In the default mode, when ResponseContentRead is used, first the content is buffered, then the method returns control to the calling method. With ResponseHeadersRead, we can begin reading the data from the stream, even while it is being sent over the network.
Thanks a lot for the awesome video
the channel should be called Code A-Maze-ng
I hope you talk about Using Compression With HttpClient in your upcoming videos
Great suggestion! I will see what I can do about it. Thank you for watching the video.
Great tutorial. Thank you :)
Thank you too for watching.