Digipost HTTP Client Builder

Apache HTTP Client configured with sensible defaults.

Лицензия

Лицензия

Категории

Категории

CLI Взаимодействие с пользователем
Группа

Группа

no.digipost
Идентификатор

Идентификатор

http-client-builder3
Последняя версия

Последняя версия

3.0.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

Digipost HTTP Client Builder
Apache HTTP Client configured with sensible defaults.
Организация-разработчик

Организация-разработчик

Digipost
Система контроля версий

Система контроля версий

https://github.com/digipost/http-client-builder

Скачать http-client-builder3

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/no.digipost/http-client-builder3/ -->
<dependency>
    <groupId>no.digipost</groupId>
    <artifactId>http-client-builder3</artifactId>
    <version>3.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/no.digipost/http-client-builder3/
implementation 'no.digipost:http-client-builder3:3.0.1'
// https://jarcasting.com/artifacts/no.digipost/http-client-builder3/
implementation ("no.digipost:http-client-builder3:3.0.1")
'no.digipost:http-client-builder3:jar:3.0.1'
<dependency org="no.digipost" name="http-client-builder3" rev="3.0.1">
  <artifact name="http-client-builder3" type="jar" />
</dependency>
@Grapes(
@Grab(group='no.digipost', module='http-client-builder3', version='3.0.1')
)
libraryDependencies += "no.digipost" % "http-client-builder3" % "3.0.1"
[no.digipost/http-client-builder3 "3.0.1"]

Зависимости

compile (3)

Идентификатор библиотеки Тип Версия
org.apache.httpcomponents : httpclient jar 4.5.3
org.apache.httpcomponents : httpcore jar 4.4.6
org.slf4j : slf4j-api jar 1.7.25

runtime (1)

Идентификатор библиотеки Тип Версия
org.slf4j : jcl-over-slf4j jar 1.7.25

test (2)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.12
org.hamcrest : java-hamcrest jar 2.0.0.0

Модули Проекта

Данный проект не имеет модулей.

Digipost HTTP Client Builder

Maven Central License

A tiny library for building instances of Apache HttpClient configured with sensible defaults.

Usage

Here are some common use cases to quickly get you started.

Client with sensible defaults:

CloseableHttpClient client = HttpClientFactory.createDefault();

Custom ssl context

PoolingHttpClientConnectionManager connectionManager = HttpClientConnectionManagerFactory
        .createDefaultBuilder()
        .setSSLSocketFactory(
                SSLConnectionSocketFactoryBuilder.create()
                        .setSslContext(getSslContext())
                        .setTlsVersions(TLS.V_1_3)
                        .build()
        )
        .build();

CloseableHttpClient client = HttpClientFactory.create(connectionManager);

Disable connection monitor

The connection monitor evicts idle and expired connections. It is by default started when the client is built.

It can be disabled by the following code:

CloseableHttpClient client = HttpClientFactory.create(HttpClientSettings.DEFAULT.connectionEvictionPolicy(ConnectionEvictionPolicy.NONE));

PS: If connection monitor is not disabled, and a new connection manager is set after the client builder has been created (i.e clientBuilder.setConnectionManager(other)), the 'old' connection monitor will still run and monitor the old connection manager.

no.digipost

Digipost

Digipost er Norges digitale postsystem utviklet av Posten Norge AS.

Версии библиотеки

Версия
3.0.1
3.0