Class ApacheHc5TransportBuilder
java.lang.Object
org.apache.juneau.rest.client.apachehttpclient50.ApacheHc5TransportBuilder
Fluent builder for
ApacheHc5Transport.
Obtain an instance via ApacheHc5Transport.builder().
See Also:
- Since:
- 9.2.1
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds and returns theApacheHc5Transport.httpClient(org.apache.hc.client5.http.impl.classic.CloseableHttpClient value) Sets the underlyingCloseableHttpClientto use.
-
Method Details
-
httpClient
public ApacheHc5TransportBuilder httpClient(org.apache.hc.client5.http.impl.classic.CloseableHttpClient value) Sets the underlyingCloseableHttpClientto use.If not set, the transport creates its own default clients: one for ordinary requests, and one with a separate connection pool whose connections are all pinned to a policy-allowed address, for SSRF-guard-active
@Remoterequests.A caller-supplied client cannot be given that pin-on-connect pool, so a transport built with one reports
ApacheHc5Transport.supportsUrlPolicy()asfalse , andRestRequestrefuses to send an SSRF-guard-active request through it.The transport takes ownership of the client and will close it when
ApacheHc5Transport.close()is called.- Parameters:
value- The client to use. Must not benull .- Returns:
- This object.
-
build
Builds and returns theApacheHc5Transport.- Returns:
- A new instance. Never
null .
-