I am trying to build an app with ASP.NET Core (aka vNext). I need to call a third-party REST-API. Traditionally, I would use HttpClient. However, I can't seem to get it to work. In my project.json file I have:
"dependencies": {
"Microsoft.Net.Http.Client": "1.0.0-*"
}
When I run dnu restore
, I receive an error that says: "Unable to locate Microsoft.Net.Http.Client >= 1.0.0-*". The other post referred to by the commenter is out-of-date.
I am building this app in Mac OS X. I don't think that makes a difference. Still, Is HttpClient
the recommended approach for calling a third-party REST API? If not, what should I be using? If it is, what am I doing wrong?
Thank you!