HttpClient

Namespace: System.Net.Http
Assembly: System.Net.Http.dll

Summary

A HttpClient class represents an abstraction over HTTP. It's a modern and recommended way to make HTTP requests in .NET applications, offering better performance, flexibility, and control compared to older methods. It supports asynchronous operations for non-blocking network calls.

Remarks

It is recommended that you instantiate a single HttpClient object and reuse it throughout the life of an application. Creating an HttpClient object is also relatively expensive and reusing an instance will benefit performance. See the remarks for HttpClient.Create for more details.

The HttpClient class supports the following features:

Constructors

Methods

Properties

See Also