This port provides a common interface for using HTTP clients. Many adapters can be developed to use different technologies.
Its main functionalities are:
- HTTP, HTTPS and HTTP/2 support
- Mutual TLS
- Body encoding/decoding
- Request/response exchange
- Form submissions
- Cookie management
- File uploading/downloading
Install the Dependency¶
This module is not meant to be used directly. You should include and Adapter implementing this feature (as http_client_ahc) in order to create HTTP clients.
Create an HTTP client¶
You create an HTTP Client instance with default options as follows:
1 2 3 4 5 6 7
If you want to configure options for the client, you create it with the following code:
1 2 3 4 5 6 7 8
Send simple requests¶
This package holds the classes that define the HTTP client and its configuration settings.