You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by sveno <s....@gmail.com> on 2009/03/23 10:51:46 UTC

Re: HTTP RETRY HANDLER



olegk wrote:
> 
> ---
> DefaultHttpClient httpclient = new DefaultHttpClient();
> 
> httpclient.setHttpRequestRetryHandler(new HttpRequestRetryHandler() {
>    
>     public boolean retryRequest(
>             IOException exception, 
>             int executionCount, 
>             HttpContext context) {
>         return false;
>     }
>     
> });
> ---
> 
> Oleg
> 

Can we just have the following line to disable auto retries.
this.objHttp.setHttpRequestRetryHandler(new
DefaultHttpRequestRetryHandler(0, false)); 

-- 
View this message in context: http://www.nabble.com/HTTP-RETRY-HANDLER-tp21789760p22656999.html
Sent from the HttpClient-User mailing list archive at Nabble.com.


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


Re: HTTP RETRY HANDLER

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Mon, 2009-03-23 at 02:51 -0700, sveno wrote:
> 
> 
> olegk wrote:
> > 
> > ---
> > DefaultHttpClient httpclient = new DefaultHttpClient();
> > 
> > httpclient.setHttpRequestRetryHandler(new HttpRequestRetryHandler() {
> >    
> >     public boolean retryRequest(
> >             IOException exception, 
> >             int executionCount, 
> >             HttpContext context) {
> >         return false;
> >     }
> >     
> > });
> > ---
> > 
> > Oleg
> > 
> 
> Can we just have the following line to disable auto retries.
> this.objHttp.setHttpRequestRetryHandler(new
> DefaultHttpRequestRetryHandler(0, false)); 
> 

Yes, you can

Oleg



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