Closed SunboX closed 7 years ago
Do you have any source that there is a fallback to HTTP/1.1 when not supported in specific platform? I couldn't find anything on MSDN.
I found this one here, but it's not official... so, maybe we have to try it first: https://blog.yaakov.online/using-http-2-in-net-client-applications/
OK, I'll test this with IIS with HTTP/2 disabled and give some feedback.
Good, works with IIS and HTTP/2 disabled. Fallback is indeed HTTP/1.1
👍
Unfortunately, the fallback won't work on Xamarin (at least I've tried it with Android). So, the lib supports HTTP/2, but the default is still HTTP/1.1.
When HTTP/2 should be used, there are overloaded ctors and a property to switch to HTTP/2.
Whether or not System.Net.Http supports HTTP/2 on a specific platform will depend on the underlying implementation on that platform. If not supported, it will fall back to HTTP/1.1