Updated 24/05/2021
HttpClient
This is the current recomended class for sending HTTP requests and receiving HTTP responses.
1 | using (var client = new HttpClient()) |
WebRequest
“We don’t recommend that you use WebRequest or its derived classes for new development. Instead, use the System.Net.Http.HttpClient class. - docs.microsoft.com”
1 | var endPoint = string.Format("{0}/fizzbuzz_event", ApiUrl); |
WebClient
“We don’t recommend that you use the WebClient class for new development. Instead, use the System.Net.Http.HttpClient class. - docs.microsoft.com”