C# - How to make HTTP / REST calls using the HttpClient
C# has great built-in support for making HTTP requests using the HttpClient. Using this client you can Put, Post, Get, Delete and much more using your »
C# has great built-in support for making HTTP requests using the HttpClient. Using this client you can Put, Post, Get, Delete and much more using your »
Using the HttpRequestMessage together with the HttpClient you can easily send a HTTP Delete request in C#. Below we have a delete endpoint on https://localhost: »
This post describes how to make a HTTP request with a specific content-type using the HttpClient in C#. Using the HttpClient you can POST JSON or »
I have always been told to reuse the HttpClient throughout the application lifetime for better performance and stability. If you search for why, there are quite »
You can set default headers on the HttpClient using the DefaultRequestHeaders property: _httpClient.DefaultRequestHeaders.Add("MyFantasticHeader" ,"MyFantasticValue"); var result = await _httpClient.GetAsync( »
If you would rather work with relative URLs than absolute URLs you can use the BaseAddress [https://docs.microsoft.com/en-us/dotnet/api/system.net.http. »
This might seem trivial, but since I got the question the other day I might as well make a post about it. Using the HttpClient [https: »
Basic authentication is becoming a rare sight, however it is still quite widely used due to its simplicity. In C#, using the HttpClient and HttpRequestMessage you »
This post demonstrates how you can change the Encoding when using the HTTPClient in C#. You can do this by setting the encoding on the StringContent »
In this post I demonstrate how you can PUT or POST JSON using the HTTPClient in C#. The simplest way to do this is using the »