Package io.servicetalk.http.api
Class HttpContextKeys
java.lang.Object
io.servicetalk.http.api.HttpContextKeys
All
ContextMap.Key
(s) defined for HTTP.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ContextMap.Key<HttpExecutionStrategy>
Allows using a customHttpExecutionStrategy
for the HTTP message execution, when present in the meta-datacontext
.static final ContextMap.Key<Boolean>
If set to true, forces creating a new connection versus potentially selecting an already established one.static final ContextMap.Key<Object>
Deprecated. -
Method Summary
-
Field Details
-
HTTP_EXECUTION_STRATEGY_KEY
Allows using a customHttpExecutionStrategy
for the HTTP message execution, when present in the meta-datacontext
. Otherwise, an automatically inferred strategy will be used by a client or server. -
HTTP_TARGET_ADDRESS_BEHIND_PROXY
Deprecated.UseTransportObserverConnectionFactoryFilter
to configureTransportObserver
and then listenConnectionObserver.onProxyConnect(Object)
callback to distinguish between a regular connection and a connection to the secure HTTP proxy tunnel. For clear text HTTP proxies, consider installing a custom client filter that will populateHttpMetaData.context()
with a similar key or reach out to the ServiceTalk developers to discuss ideas.When opening a connection to a proxy, this key tells what is the actual (unresolved) target address behind the proxy this connection will be established to.To distinguish between a secure HTTP proxy tunneling and a clear text HTTP proxy, check presence of
ConnectionInfo.sslConfig()
. -
HTTP_FORCE_NEW_CONNECTION
If set to true, forces creating a new connection versus potentially selecting an already established one.This key is only available when reserving a connection and will be ignored when performing a regular request on the client (for example through
HttpRequester.request(HttpRequest)
).
-
TransportObserverConnectionFactoryFilter
to configureTransportObserver
and then listenConnectionObserver.onProxyConnect(Object)
callback to distinguish between a regular connection and a connection to the secure HTTP proxy tunnel.