Class AdyenCustomRedirectStrategy

  • All Implemented Interfaces:
    org.apache.hc.client5.http.protocol.RedirectStrategy

    public class AdyenCustomRedirectStrategy
    extends org.apache.hc.client5.http.impl.DefaultRedirectStrategy
    Implements a custom redirect strategy when the API returns 308
    • Field Summary

      • Fields inherited from class org.apache.hc.client5.http.impl.DefaultRedirectStrategy

        INSTANCE
    • Constructor Detail

      • AdyenCustomRedirectStrategy

        public AdyenCustomRedirectStrategy()
    • Method Detail

      • getLocationURI

        public 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
        Override getLocationURI to validate the location header
        Specified by:
        getLocationURI in interface org.apache.hc.client5.http.protocol.RedirectStrategy
        Overrides:
        getLocationURI in class org.apache.hc.client5.http.impl.DefaultRedirectStrategy
        Parameters:
        request - the request
        response - the response
        context - the context
        Returns:
        location url as URI
        Throws:
        org.apache.hc.core5.http.HttpException - an error has occurred