问题
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