Class EarlyHintsAsyncExec
java.lang.Object
org.apache.hc.client5.http.impl.async.EarlyHintsAsyncExec
- All Implemented Interfaces:
AsyncExecChainHandler
Execution chain handler that delivers
103 Early Hints
informational responses to a user-provided
EarlyHintsListener
without affecting processing of the final (non-1xx) response.
This handler forwards each 103 informational response to the
listener. All other responses (including the final response) are delegated
unchanged.
For security and interoperability, applications typically act only on
headers considered safe in Early Hints (for example, Link with
rel=preload or rel=preconnect).
- Since:
- 5.6
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute(org.apache.hc.core5.http.HttpRequest request, org.apache.hc.core5.http.nio.AsyncEntityProducer entityProducer, AsyncExecChain.Scope scope, AsyncExecChain chain, AsyncExecCallback callback) Executes the actual HTTP request.
-
Field Details
-
listener
-
-
Constructor Details
-
EarlyHintsAsyncExec
-
-
Method Details
-
execute
public void execute(org.apache.hc.core5.http.HttpRequest request, org.apache.hc.core5.http.nio.AsyncEntityProducer entityProducer, AsyncExecChain.Scope scope, AsyncExecChain chain, AsyncExecCallback callback) throws org.apache.hc.core5.http.HttpException, IOException Description copied from interface:AsyncExecChainHandlerExecutes the actual HTTP request. The handler can choose to return a response message immediately inside the call or asynchronously at some later point or delegate request execution to the next element in the execution chain.- Specified by:
executein interfaceAsyncExecChainHandler- Parameters:
request- the actual request.entityProducer- the request entity producer ornullif the request does not enclose an entity.scope- the execution scope .chain- the next element in the request execution chain.callback- the execution callback.- Throws:
org.apache.hc.core5.http.HttpException- If a protocol error occurs.IOException- If an I/O error occurs.
-