httpservices/src/main/java/ucar/httpservices/HTTPSession.java
public HTTPSession setMaxRedirects(int n)
    {
        if(n < 0) //validate
            throw new IllegalArgumentException("setMaxRedirects");
        localsettings.put(Prop.MAX_REDIRECTS, n);
        this.cachevalid = false;
        return this;
    }
public HTTPSession setMaxRedirects(int n)
    {
        if(n < 0) //validate
            throw new IllegalArgumentException("setMaxRedirects");
        localsettings.put(Prop.MAX_REDIRECTS, n);
        this.cachevalid = false;
        return this;
    }
Set the max number of redirects to follow

@param n