CocoaPods trunk is moving to be read-only. Read more on the blog, there are 18 months to go.

RetriableAFNetworking 1.0.4

RetriableAFNetworking 1.0.4

Maintained by retriable.



 
Depends on:
Retriable>= 0
AFNetworking>= 0
JRSwizzle>= 0
 

  • By
  • retriable

RetriableAFNetworking

License MIT Build Status Carthage compatible Pod Version Pod Platform

Retriable AFNetworking

Cocoapods

Add the following to your project's Podfile:

pod 'RetriableAFNetworking'

Carthage

Add the following to your project's Cartfile:

github "retriable/RetriableAFNetworking"

Example

[sessionManager GET:@"https://api.github.com/repos/retriable/RetriableAFNetworking/readme" headers:nil parameters:nil progress:nil success:^(NSURLSessionDataTask *task, id responseObject) {

} failure:^(NSURLSessionDataTask *task, NSError *error) {

} retryAfter:^NSTimeInterval(NSInteger currentRetryTime, NSError *latestError) {
if(![latestError.domain isEqualToString:NSURLErrorDomain]) return 0;
switch (latestError.code) {
case NSURLErrorTimedOut:
case NSURLErrorNotConnectedToInternet:
case NSURLErrorNetworkConnectionLost: return 5;
default: return 0;
}
}];