C# – Get and send JSON with HttpClient
The simplest way to get and send JSON with HttpClient is to use the GetFromJsonAsync() and PostAsJsonAsync() extension methods (in System.Net.Http.Json), like this: Note: You have to install the System.Net.Http.Json package if you’re using a framework version before .NET 5. These extension methods use System.Text.Json for serialization. They simplify things by abstracting away the common … Read more