System.Net.Http.HttpClient
Added in .NET Framework 4.5
The goal of this API was to provide a simpler, cleaner abstraction layer and flexibility for implementing the HTTP client role, as compared to the older HttpWebRequest API.
link - learn.microsoft.com/en-us/dotnet/csharp/tutorials/console-webapiclient
namespace WebAPIClient
{
class Program
{
private static readonly System.Net.Http.HttpClient client = new HttpClient();
static async Task Main(string[] args)
{
//...
}
}
}
Methods
| CancelPendingRequests | |
| DeleteAsync | |
| GetAsync | |
| GetByteArrayAsync | |
| GetStreamAsync | |
| GetStringAsync | |
| PostAsync | |
| PutAsync | |
| SendAsync | |
| PatchAsync |
© 2026 Better Solutions Limited. All Rights Reserved. © 2026 Better Solutions Limited TopPrevNext