Skip to content

Commit 624be66

Browse files
committed
1 parent 29fe794 commit 624be66

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

library/src/com/loopj/android/http/AsyncHttpClient.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,14 @@ public void setSSLSocketFactory(SSLSocketFactory sslSocketFactory) {
278278
this.httpClient.getConnectionManager().getSchemeRegistry().register(new Scheme("https", sslSocketFactory, 443));
279279
}
280280

281+
/**
282+
* Sets the maximum number of retries for a particular Request.
283+
* @param retries maximum number of retries per request
284+
*/
285+
public void setMaxRetries(int retries) {
286+
this.httpClient.setHttpRequestRetryHandler(new RetryHandler(retries));
287+
}
288+
281289
/**
282290
* Sets headers that will be added to all requests this client makes (before sending).
283291
*

0 commit comments

Comments
 (0)