(http) Web request provider in coreclr/dnxCore?

三世轮回 提交于 2019-12-10 13:16:15

问题


Is there a provider available for doing web requests/basic GET downloads in coreclr? (.net core)

Both System.Net.Webclient and HttpWebRequest/HttpWebResponse aren't available, I realize it's aimed at serving content, not consuming, but basic string downloading seems like something that really should have been included?

Am I forgetting something, or is it just straight up not possible?

I can default to full dnx, but would really rather not and lose cross platform compatibility.


回答1:


You should use the modern HttpClient class from System.Net.Http on NuGet, which supports DNXCore.



来源:https://stackoverflow.com/questions/32211541/http-web-request-provider-in-coreclr-dnxcore

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