Class HTTPSampler2

    • Constructor Detail

      • HTTPSampler2

        public HTTPSampler2()
    • Method Detail

      • interrupt

        public boolean interrupt()
        Description copied from interface: Interruptible
        Interrupt the current operation if possible.
        Specified by:
        interrupt in interface Interruptible
        Returns:
        true if there was an operation to interrupt.
      • sample

        protected HTTPSampleResult sample​(URL u,
                                          String method,
                                          boolean areFollowingRedirect,
                                          int depth)
        Description copied from class: HTTPSamplerBase
        Samples the URL passed in and stores the result in HTTPSampleResult, following redirects and downloading page resources as appropriate.

        When getting a redirect target, redirects are not followed and resources are not downloaded. The caller will take care of this.

        Specified by:
        sample in class HTTPSamplerBase
        Parameters:
        u - URL to sample
        method - HTTP method: GET, POST,...
        areFollowingRedirect - whether we're getting a redirect target
        depth - Depth of this target in the frame structure. Used only to prevent infinite recursion.
        Returns:
        results of the sampling, can be null if u is in CacheManager
      • saveConnectionCookies

        protected void saveConnectionCookies​(HttpMethod httpMethod,
                                             URL url,
                                             CookieManager cookieManager)
      • getResponseHeaders

        protected String getResponseHeaders​(HttpMethod httpMethod)
      • getConnectionHeaders

        protected String getConnectionHeaders​(HttpMethod httpMethod)
      • setSavedClient

        protected void setSavedClient​(HttpClient savedClient)