Where is the PostAsJsonAsync method in ASP.NET Core?

LP13 picture LP13 · Oct 13, 2016 · Viewed 50.8k times · Source

I was looking for the PostAsJsonAsync() extension method in ASP.NET Core. Based on this article, it's available in the Microsoft.AspNet.WebApi.Client assembly.

I had thought Microsoft had changed all of the assembly names from Microsoft.AspNet to Microsoft.AspNetCore to be more specific to .NET Core, however, and yet I cannot find an Microsoft.AspNetCore.WebApi.Client assembly.

Where is the PostAsJsonAsync() extension method in ASP.NET Core?

Answer

Oliver picture Oliver · Apr 15, 2019

It comes as part of the library Microsoft.AspNet.WebApi.Client https://www.nuget.org/packages/Microsoft.AspNet.WebApi.Client/