hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: HTTP RETRY HANDLER
Date Tue, 03 Feb 2009 15:12:10 GMT
On Mon, 2009-02-02 at 14:35 +0100, Joan Balagueró wrote:
> Hello,
> 
>  
> 
> To set a retryHandler:
> 
> this.objHttp.setHttpRequestRetryHandler(new
> DefaultHttpRequestRetryHandler(retryHttp, false));
> 
>  
> 
> But if I want to disable this retry handler (because the user doesn’t want
> to retry anything), how can I do this?
> 
---
DefaultHttpClient httpclient = new DefaultHttpClient();

httpclient.setHttpRequestRetryHandler(new HttpRequestRetryHandler() {
   
    public boolean retryRequest(
            IOException exception, 
            int executionCount, 
            HttpContext context) {
        return false;
    }
    
});
---

Oleg

>  
> 
> Thanks,
> 
> Joan. 
> 
>  
> 
> 
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Mime
View raw message