Package io.servicetalk.http.api
Interface ProxyConfig<A>
- Type Parameters:
A
- the type of address
public interface ProxyConfig<A>
Configuration for a proxy.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionaddress()
Address of the proxy.An initializer forHttpHeaders
related to HTTP/1.1 CONNECT request.static <A> ProxyConfig<A>
forAddress
(A address) Returns aProxyConfig
for the specifiedaddress
.
-
Method Details
-
address
A address()Address of the proxy.Usually, this is an unresolved proxy address and its type must match the type of address before resolution used by
SingleAddressHttpClientBuilder
. However, if the client builder was created for a resolved address, this address must also be already resolved. Otherwise, a runtime exception will occur.- Returns:
- address of the proxy
-
connectRequestHeadersInitializer
Consumer<HttpHeaders> connectRequestHeadersInitializer()An initializer forHttpHeaders
related to HTTP/1.1 CONNECT request.When this
ProxyConfig
is used for secure proxy tunnels (whenClientSslConfig
is configured) the tunnel is always initialized usingHTTP/1.1 CONNECT
request. ThisConsumer
can be used to set customHttpHeaders
for that request, likeproxy-authorization
, tracing, or any other header.- Returns:
- An initializer for
HttpHeaders
related to HTTP/1.1 CONNECT request
-
forAddress
Returns aProxyConfig
for the specifiedaddress
.All other
ProxyConfig
options will use their default values applied byProxyConfigBuilder
.- Type Parameters:
A
- the type of address- Parameters:
address
- Address of the proxy- Returns:
- a
ProxyConfig
for the specifiedaddress
- See Also:
-