I was looking into this link. I tried the git mentioned in the link. The extension functions PostAsJsonAsync
, ReadAsAsync
and PutAsJsonAsync
were not found. When I looked them up, they all belonged to the HttpClientExtensions
class. However I am unable to find this class anywhere. I did find this, but I do not find this class inside the System.Net.Http
namespace. The project from git simply shows errors on these extension functions.
I have tried looking for this class in the latest versions of .net standard and .net framework. I have looked into nugets and add reference > assemblies.
Asked
Active
Viewed 2,055 times
0

Neville Nazerane
- 6,622
- 3
- 46
- 79
-
Which version of .NET are you using? The System.Net.Http was added in .NET 4.5 – Florian Zaskoku Oct 27 '17 at 06:14
-
when i cloned the git it was on 4.5.1. I updated it to 4.7. Both didn't work – Neville Nazerane Oct 27 '17 at 06:16
-
I got the same problem a few weeks ago. Try to install this https://www.nuget.org/packages/Microsoft.AspNet.WebApi.SelfHost/5.2.2 – Florian Zaskoku Oct 27 '17 at 06:16
-
I tried installing it, but what is it for? it seems to be setting up web api 2. My api is set up in .net core – Neville Nazerane Oct 27 '17 at 06:21
-
Well. If that's not the right for you you can install the System.Net.Http per hand. https://i.imgur.com/E7ghIMm.png – Florian Zaskoku Oct 27 '17 at 06:26
-
well.. that's already imported – Neville Nazerane Oct 27 '17 at 06:35