Home

Awesome

<p align="left" > <img src="https://raw.githubusercontent.com/kubatruhlar/AFNetworking-RetryPolicy/master/Images/logo.png" alt="AFNetworking+RetryPolicy" title="AFNetworking+RetryPolicy" width="400"> </p>

Travis Version Platform Documentation Join the chat at https://gitter.im/AFNetworking-RetryPolicy/ License

If a request timed out, you usually have to call that request again by yourself. AFNetworking+RetryPolicy is an objective-c category that adds the ability to set the retry logic for requests made with AFNetworking.

Features

Getting started

Want to try it first? Use pod try AFNetworking+RetryPolicy command.

Usage

Example

    AFHTTPSessionManager *manager = [AFHTTPSessionManager new];
    [manager GET:@"foo" parameters:nil headers:nil progress:nil success:^(NSURLSessionDataTask *task, id responseObject) {
        NSLog(@"%@", responseObject);
        
    } failure:^(NSURLSessionDataTask *task, NSError *error) {
        NSLog(@"%@", error.localizedDescription);
        
    } retryCount:5 retryInterval:2.0 progressive:false fatalStatusCodes:@[@401, @403]];

Log

Requirements

Old versions

For AFNetworking 3 support

For AFNetworking 2 support*

*Will not be updated anymore.

For AFNetworking 1 support*

*Will not be updated anymore.

Author and credit

License