File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
src/com/loopj/android/http Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -218,7 +218,7 @@ public void setUserAgent(String userAgent) {
218
218
}
219
219
220
220
/**
221
- * Sets the connection time oout . By default, 10 seconds
221
+ * Sets the connection timeout . By default, 10 seconds
222
222
* @param timeout the connect/socket timeout in milliseconds
223
223
*/
224
224
public void setTimeout (int timeout ){
@@ -236,7 +236,15 @@ public void setTimeout(int timeout){
236
236
public void setSSLSocketFactory (SSLSocketFactory sslSocketFactory ) {
237
237
this .httpClient .getConnectionManager ().getSchemeRegistry ().register (new Scheme ("https" , sslSocketFactory , 443 ));
238
238
}
239
-
239
+
240
+ /**
241
+ * Sets the maximum number of retries for a particular Request.
242
+ * @param retries maximum number of retries per request
243
+ */
244
+ public void setMaxRetries (int retries ) {
245
+ this .httpClient .setHttpRequestRetryHandler (new RetryHandler (retries ));
246
+ }
247
+
240
248
/**
241
249
* Sets headers that will be added to all requests this client makes (before sending).
242
250
* @param header the name of the header
You can’t perform that action at this time.
0 commit comments