GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - shaioz/AFNetworking-AutoRetry: An iOS category adding retry functionality to requests made using AFNetworking 2

BranchesTags
Open more actions menu

Latest commit

 

History

35 Commits
35 Commits

Folders and files

NameName
Last commit message
Last commit date
AFNetworking-AutoRetry.xcodeproj
AFNetworking-AutoRetry.xcodeproj
 
 
AFNetworking-AutoRetry.xcworkspace
AFNetworking-AutoRetry.xcworkspace
 
 
AFHTTPRequestOperationManager+AutoRetry.h
AFHTTPRequestOperationManager+AutoRetry.h
 
 
AFHTTPRequestOperationManager+AutoRetry.m
AFHTTPRequestOperationManager+AutoRetry.m
 
 
AFHTTPSessionManager+AutoRetry.h
AFHTTPSessionManager+AutoRetry.h
 
 
AFHTTPSessionManager+AutoRetry.m
AFHTTPSessionManager+AutoRetry.m
 
 
AFNetworking+AutoRetry.podspec
AFNetworking+AutoRetry.podspec
 
 
LICENSE
LICENSE
 
 
Podfile
Podfile
 
 
Podfile.lock
Podfile.lock
 
 
README.md
README.md
 
 

Repository files navigation

AFNetworking-AutoRetry

An iOS category adding retry functionality to requests made using AFNetworking 2

Installation with CocoaPods

CocoaPods is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries like AFNetworking in your projects. See the "Getting Started" guide for more information. You can install it with the following command:

$ gem install cocoapods

To integrate AFNetworking-AutoRetry into your Xcode project using CocoaPods, specify it in your Podfile:

pod 'AFNetworking+AutoRetry'

Then, run the following command:

pod install

Usage

Import the libraries at the top of your .m file

#import <AFNetworking/AFHTTPRequestOperationManager.h>
#import <AFNetworking+AutoRetry/AFHTTPRequestOperationManager+AutoRetry.h>

Then, in your function:

// setup POST data
NSDictionary *parameters = @{@"key":@"value"};
AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager];
// set the network timeout duration to 30 seconds
manager.requestSerializer = [[AFHTTPRequestSerializerWithTimeout alloc] initWithTimeout:30];
[manager POST:@"http://www.example.com/api" parameters:parameters success:^(AFHTTPRequestOperation *operation, id responseObject) {
    // success, parse the response here
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
    // failure, e.g. network error
} autoRetry:3];

where 3 is the number of retries. Similar for GET cases.

##Communication If you encounter any questions or issues, please use the tag afnetworking-autoretry to ask in Stack Overflow. If you think you found a bug, please report it at Issues.

##Credits AFNetworking is owned and maintained by the Alamofire Software Foundation. AFNetworking-AutoRetry is created by Shai Ohev Zion and now maintained by Shivan Raptor and Daniel Jankovič.

About

An iOS category adding retry functionality to requests made using AFNetworking 2

Resources

Readme
MIT license
Activity

Stars

218 stars

Watchers

11 watching

Forks

36 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.