The HttpClient class is used to send requests and receive responses. It encapsulates details such as which version of the HTTP protocol to use, whether to follow redirects (if the resource you are trying to connect to has moved to another location), whether to use a proxy or an authenticator, and a few more things. The HttpClient class is used to configure a client state (an HTTP Client sends and receives data from a client to server). An HttpClient instance can be used to send multiple requests and receive their corresponding responses. However, once created, an HttpClient instance is immutable.