6.54Configuring HTTP/3 Support
Created on Aug 17, 2026~1 min read
HTTP/3 is the latest version of the HTTP protocol, built on top of the QUIC (Quick UDP Internet Connections) protocol, and is designed to provide lower latency, higher throughput, and improved multiplexing. You can add the following configuration to enable HTTP/3 support:
// Default client configurationservices.AddHttpClient(string.Empty, client =>{ // Set the default request version to HTTP/3 client.DefaultRequestVersion = HttpVersion.Version30; // Specify the version policy as exact request version match to ensure HTTP/3 is used client.DefaultVersionPolicy = HttpVersionPolicy.RequestVersionExact;});With the above configuration, we can ensure that the specified HTTP version (i.e., HTTP/3) is strictly used when sending remote HTTP requests, thereby taking full advantage of the performance improvements and functional benefits provided by HTTP/3.