Is there any way to use the new http/2 api to send push notifications in C#?

天涯浪子 提交于 2019-12-07 19:30:15

问题


I have tried several options, the closest I've got was with httptwo, but it does not seem production ready, I've also tried with HttpClient setting version to 2.0, but the call won't pass, I think Http/2 support in .NET is not complete. Any ideas?


回答1:


Currently, in the standard .NET framework, HTTP/2 is not supported in HttpClient. However, in the .NET Core framework, it is.. but it requires to be run on Windows 10 (or, I assume Windows Server 2016). You also have to use only the async methods.

There is also a package called System.Net.Http.WinHttpHandler, which you can get through Nuget that supports HTTP/2 on standard .NET



来源:https://stackoverflow.com/questions/43287075/is-there-any-way-to-use-the-new-http-2-api-to-send-push-notifications-in-c

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!