How To Install httpcomponents-client on CentOS 7

In this tutorial we learn how to install httpcomponents-client on CentOS 7. httpcomponents-client is HTTP agent implementation based on httpcomponents HttpCore

Introduction

In this tutorial we learn how to install httpcomponents-client on CentOS 7.

What is httpcomponents-client

HttpClient is a HTTP/1.1 compliant HTTP agent implementation based on httpcomponents HttpCore. It also provides reusable components for client-side authentication, HTTP state management, and HTTP connection management. HttpComponents Client is a successor of and replacement for Commons HttpClient 3.x. Users of Commons HttpClient are strongly encouraged to upgrade.

We can use yum or dnf to install httpcomponents-client on CentOS 7. In this tutorial we discuss both methods but you only need to choose one of method to install httpcomponents-client.

Install httpcomponents-client on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

After updating yum database, We can install httpcomponents-client using yum by running the following command:

sudo yum -y install httpcomponents-client

Install httpcomponents-client on CentOS 7 Using dnf

If you don’t have dnf installed you can install DNF on CentOS 7 first. Update yum database with dnf using the following command.

sudo dnf makecache

After updating yum database, We can install httpcomponents-client using dnf by running the following command:

sudo dnf -y install httpcomponents-client

How To Uninstall httpcomponents-client on CentOS 7

To uninstall only the httpcomponents-client package we can use the following command:

sudo dnf remove httpcomponents-client

References

Summary

In this tutorial we learn how to install httpcomponents-client on CentOS 7 using yum and dnf.