Interface HttpClientProvider

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      org.apache.http.impl.client.CloseableHttpClient prepareHttpClient​(java.lang.String url)
      This method should be called by the scanner before every execution of an Http command.
      • Methods inherited from interface java.io.Closeable

        close
    • Method Detail

      • prepareHttpClient

        org.apache.http.impl.client.CloseableHttpClient prepareHttpClient​(java.lang.String url)
        This method should be called by the scanner before every execution of an Http command. It is typically a lightweight call since the provider returns the same client object if it is still valid. The provider will create a new client when needed, for example when the client has timed out. The url that the scanner is going to execute should be passed to prepareHttpClient(String url) for cases where different Http clients are provided for different Urls. For example when different authentication is required.
        Parameters:
        url - The url the returned Http client will be used for.
        Returns:
        Http client to be used by the scanner