I'm writing an application in C#. It pulls the data from Cloudant NoSQL DB.
But when I'm trying to create the Http client:
HttpClient client = HttpClientFactory.Create(new LoggingHandler());
the compiler throws error saying that
'HttpClientFactory' does not exist in the current context
I have also included:
using System.Net.Http;"
at the top.
I still cannot find where the error is.
Could someone please throw some light.
Install the Microsoft.AspNet.WebApi.Client nuget package.
VS -> Tools -> Nugetpackagemanager -> Package manager console
Install-Package Microsoft.AspNet.WebApi.Client
or (specific version)
Install-Package Microsoft.AspNet.WebApi.Client -Version 5.2.2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With