mdsami / android-query

Automatically exported from code.google.com/p/android-query
0 stars 0 forks source link

Automatic retry for ajax method. #65

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Sorry but question was about retry. Do you implemented something like this in 
AJAX ?

httpclient.setHttpRequestRetryHandler(new DefaultHttpRequestRetryHandler(3, 
false) {

    public boolean retryRequest(IOException exception, int executionCount,
            HttpContext context) {
             if (executionCount > this.getRetryCount()) {
                return false;
            }
             if (exception != null) {
                 return true;
             } else {
                 return super.retryRequest(exception, executionCount, context);
             }

    }
});

Original issue reported on code.google.com by tinyeeliu@gmail.com on 18 Jul 2012 at 2:50

GoogleCodeExporter commented 8 years ago
.retry() is added to AjaxCallback in latest release.

Original comment by tinyeeliu@gmail.com on 9 May 2013 at 7:37

GoogleCodeExporter commented 8 years ago
Is it working? I would imagine that retry would repeat the whole request and in 
case no connection callback result would be empty again. When I invoke it with 
no connection nothing seems to happen.

Original comment by darck...@gmail.com on 4 Sep 2013 at 2:45