java.lang.Object
org.shredzone.acme4j.connector.HttpConnector
A generic HTTP connector. It creates
HttpClient.Builder
and
HttpRequest.Builder
that can be individually customized according to the needs
of the CA.- Since:
- 3.0.0
-
Constructor Summary
ConstructorDescriptionHttpConnector
(NetworkSettings networkSettings) Creates a newHttpConnector
that is using the givenNetworkSettings
. -
Method Summary
Modifier and TypeMethodDescriptionCreates a newHttpClient.Builder
.createRequestBuilder
(URL url) Creates a newHttpRequest.Builder
that is preconfigured and bound to the given URL.static String
Returns the default User-Agent to be used.
-
Constructor Details
-
HttpConnector
Creates a newHttpConnector
that is using the givenNetworkSettings
.
-
-
Method Details
-
defaultUserAgent
Returns the default User-Agent to be used.- Returns:
- User-Agent
-
createRequestBuilder
Creates a newHttpRequest.Builder
that is preconfigured and bound to the given URL. Subclasses can override this method to extend the configuration, or create a different builder.- Parameters:
url
-URL
to connect to- Returns:
HttpRequest.Builder
connected to theURL
-
createClientBuilder
Creates a newHttpClient.Builder
.The
HttpClient.Builder
is already preconfigured with a reasonable timeout, the proxy settings, authenticator, and that it follows normal redirects. Subclasses can override this method to extend the configuration, or to create a different builder.
-