ESA HttpClient is an asynchronous event-driven http client based on netty.
- Http1/H2/H2cUpgrade
- Https
- Epoll/NIO
- Interceptor
- Filter
- Retry, Redirect, 100-expect-continue
- Segmented read/write
- Multipart
- Metrics
- more features...
<dependency>
<groupId>io.esastack</groupId>
<artifactId>httpclient-core</artifactId>
<version>${mvn.version}</version>
</dependency>
final HttpClient client = HttpClient.create()
.version(HttpVersion.HTTP_2)
.h2ClearTextUpgrade(true)
.build();
final HttpResponse response = client.get("http://127.0.0.1:8081/").execute().get();
logger.info(response.body().string(StandardCharsets.UTF_8));
client.close();
See more details in Reference Doc