Interface HttpClientContextHandler


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

      • invokeBefore

        void invokeBefore​(@Nonnull
                          HttpClientContext context,
                          @Nonnull
                          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
                         HttpClientContext context,
                         @Nonnull
                         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