Class HttpClientConfiguration.Builder
java.lang.Object
org.mule.weave.v2.module.http.service.HttpClientConfiguration.Builder
- Enclosing class:
- HttpClientConfiguration
Builder of
HttpClientConfigurations. At the very least, an id must be provided.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Creates an instance ofHttpClientConfiguration.setCompressionHeader(boolean compressionHeader) Defines the `Accept-Encoding: gzip, deflate` HTTP header will be sent to each requestfalseby default.setConnectionTimeout(int connectionTimeout) Defines the number of milliseconds that a connection can wait until established a connection.setDecompress(boolean decompress) Defines whether responses should be decompressed automatically by the HttpClient,trueby default.setTlsConfiguration(TlsConfiguration tlsConfiguration) Required exclusively for HTTPS, this defines through aTlsConfigurationall the TLS related data to establish such connections.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
setConnectionTimeout
Defines the number of milliseconds that a connection can wait until established a connection.- Parameters:
connectionTimeout- timeout value (in milliseconds).- Returns:
- this builder.
-
setCompressionHeader
Defines the `Accept-Encoding: gzip, deflate` HTTP header will be sent to each requestfalseby default.- Parameters:
compressionHeader- whether `Accept-Encoding` should be sent.- Returns:
- this builder.
-
setDecompress
Defines whether responses should be decompressed automatically by the HttpClient,trueby default.- Parameters:
decompress- whether responses should be decompressed automatically.- Returns:
- this builder.
-
setTlsConfiguration
Required exclusively for HTTPS, this defines through aTlsConfigurationall the TLS related data to establish such connections.- Parameters:
tlsConfiguration- aTlsConfigurationwith the required data.- Returns:
- this builder.
-
build
Creates an instance ofHttpClientConfiguration.- Returns:
- an
HttpClientConfigurationas described.
-