Interface HttpClientContextHandler


@ThreadSafe
public interface HttpClientContextHandler
Extension that allows the HttpClientContext to be externally manipulated before use.
Since:
7.4.0
  • Method Summary

    Modifier and Type Method Description
    void invokeAfter​(org.apache.http.client.protocol.HttpClientContext context, org.apache.http.client.methods.HttpUriRequest request)
    Perform any desired context modifications after use.
    void invokeBefore​(org.apache.http.client.protocol.HttpClientContext context, org.apache.http.client.methods.HttpUriRequest request)
    Perform any desired context modifications before use.
  • Method Details

    • invokeBefore

      void invokeBefore​(@Nonnull org.apache.http.client.protocol.HttpClientContext context, @Nonnull org.apache.http.client.methods.HttpUriRequest request) throws IOException
      Perform any desired context modifications before use.
      Parameters:
      context - the context to operate on
      request - the request that will be executed
      Throws:
      IOException - if the call should be aborted
    • invokeAfter

      void invokeAfter​(@Nonnull org.apache.http.client.protocol.HttpClientContext context, @Nonnull org.apache.http.client.methods.HttpUriRequest request) throws IOException
      Perform any desired context modifications after use.
      Parameters:
      context - the context to operate on
      request - the request that was executed
      Throws:
      IOException - if the call should be aborted