Class DefaultRedirectStrategy

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.net.URI createLocationURI​(java.lang.String location)  
      java.net.URI getLocationURI​(org.apache.hc.core5.http.HttpRequest request, org.apache.hc.core5.http.HttpResponse response, org.apache.hc.core5.http.protocol.HttpContext context)  
      boolean isRedirected​(org.apache.hc.core5.http.HttpRequest request, org.apache.hc.core5.http.HttpResponse response, org.apache.hc.core5.http.protocol.HttpContext context)
      Determines if a request should be redirected to a new location given the response from the target server.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DefaultRedirectStrategy

        public DefaultRedirectStrategy()
    • Method Detail

      • isRedirected

        public boolean isRedirected​(org.apache.hc.core5.http.HttpRequest request,
                                    org.apache.hc.core5.http.HttpResponse response,
                                    org.apache.hc.core5.http.protocol.HttpContext context)
                             throws org.apache.hc.core5.http.ProtocolException
        Description copied from interface: RedirectStrategy
        Determines if a request should be redirected to a new location given the response from the target server.
        Specified by:
        isRedirected in interface RedirectStrategy
        Parameters:
        request - the executed request
        response - the response received from the target server
        context - the context for the request execution
        Returns:
        true if the request should be redirected, false otherwise
        Throws:
        org.apache.hc.core5.http.ProtocolException
      • getLocationURI

        public java.net.URI getLocationURI​(org.apache.hc.core5.http.HttpRequest request,
                                           org.apache.hc.core5.http.HttpResponse response,
                                           org.apache.hc.core5.http.protocol.HttpContext context)
                                    throws org.apache.hc.core5.http.HttpException
        Specified by:
        getLocationURI in interface RedirectStrategy
        Throws:
        org.apache.hc.core5.http.HttpException
      • createLocationURI

        protected java.net.URI createLocationURI​(java.lang.String location)
                                          throws org.apache.hc.core5.http.ProtocolException
        Throws:
        org.apache.hc.core5.http.ProtocolException
        Since:
        4.1