Configure .NET’s HttpClient to make HTTP requests using the HTTP/2 protocol

212971649-9de7b74f-9fb9-4152-beea-856668

A few days ago, I enabled the HTTP/2 protocol version on my blog site, but unexpectedly found that a program I used to grab web pages with WebClient was broken. In fact, I didn’t find that the problem was caused by HTTP/2 at the beginning. It took me a while to realize that the problem might be caused by the difference in HTTP version. In this article, I will share several different HttpClient programming methods, allowing you to use the HTTP/2 protocol version to retrieve web pages on the remote web server.

continue reading

This article is transferred from https://blog.miniasp.com/post/2023/01/17/How-to-use-HTTP-Version-2-with-HttpClient
This site is only for collection, and the copyright belongs to the original author.