{"id":1642,"url":"https://github.com/kubatruhlar/AFNetworking-RetryPolicy","last_synced_at":"2025-08-02T04:32:05.114Z","repository":{"id":56900348,"uuid":"66684408","full_name":"kubatruhlar/AFNetworking-RetryPolicy","owner":"kubatruhlar","description":"Nice category that adds the ability to set the retry interval, retry count and progressiveness.","archived":false,"fork":false,"pushed_at":"2022-08-17T22:26:41.000Z","size":294,"stargazers_count":213,"open_issues_count":4,"forks_count":31,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-07-16T08:46:00.417Z","etag":null,"topics":["afnetworking","cocoapods","ios","objective-c","retry-policy"],"latest_commit_sha":null,"homepage":"","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kubatruhlar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-08-26T23:04:21.000Z","updated_at":"2025-03-06T14:01:43.000Z","dependencies_parsed_at":"2022-08-21T02:20:53.732Z","dependency_job_id":null,"html_url":"https://github.com/kubatruhlar/AFNetworking-RetryPolicy","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/kubatruhlar/AFNetworking-RetryPolicy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kubatruhlar%2FAFNetworking-RetryPolicy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kubatruhlar%2FAFNetworking-RetryPolicy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kubatruhlar%2FAFNetworking-RetryPolicy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kubatruhlar%2FAFNetworking-RetryPolicy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kubatruhlar","download_url":"https://codeload.github.com/kubatruhlar/AFNetworking-RetryPolicy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kubatruhlar%2FAFNetworking-RetryPolicy/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268334615,"owners_count":24233793,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["afnetworking","cocoapods","ios","objective-c","retry-policy"],"created_at":"2024-01-05T20:15:52.124Z","updated_at":"2025-08-02T04:32:04.799Z","avatar_url":"https://github.com/kubatruhlar.png","language":"Objective-C","funding_links":[],"categories":["Networking"],"sub_categories":["Video","Other free courses"],"readme":"\u003cp align=\"left\" \u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/kubatruhlar/AFNetworking-RetryPolicy/master/Images/logo.png\" alt=\"AFNetworking+RetryPolicy\" title=\"AFNetworking+RetryPolicy\" width=\"400\"\u003e\n\u003c/p\u003e\n\n[![Travis](https://travis-ci.org/kubatruhlar/AFNetworking-RetryPolicy.svg)](https://travis-ci.org/kubatruhlar/AFNetworking-RetryPolicy)\n[![Version](https://img.shields.io/cocoapods/v/AFNetworking+RetryPolicy.svg)](http://cocoapods.org/pods/AFNetworking+RetryPolicy)\n[![Platform](https://img.shields.io/cocoapods/p/AFNetworking+RetryPolicy.svg)](http://cocoapods.org/pods/AFNetworking+RetryPolicy)\n[![Documentation](https://img.shields.io/cocoapods/metrics/doc-percent/AFNetworking+RetryPolicy.svg)](http://cocoadocs.org/docsets/AFNetworking+RetryPolicy/)\n[![Join the chat at https://gitter.im/AFNetworking-RetryPolicy/](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/AFNetworking-RetryPolicy/General?utm_source=share-link\u0026utm_medium=link\u0026utm_campaign=share-link)\n[![License](https://img.shields.io/cocoapods/l/AFNetworking+RetryPolicy.svg)](http://cocoapods.org/pods/AFNetworking+RetryPolicy)\n\nIf 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](https://github.com/AFNetworking/AFNetworking).\n\n- [Features](#features)\n- [Getting started](#getting-started)\n- [Usage](#usage)\n- [Requirements](#requirements)\n- [Old versions](#old-versions)\n- [Author and credit](#author-and-credit)\n- [License](#license)\n\n## Features\n- [x] **retryCount** - How many times to try.\n- [x] **retryInterval** - Time interval between attempts in seconds.\n- [x] **progressive** - Next attempt will always take more time than the previous one. *(Uses Exponentiation)*\n- [x] **fatalStatusCodes** - These will trigger failure block immediately when received and ends current retry.\n\n## Getting started\n- Installing through **[CocoaPods](https://cocoapods.org/)** with `pod 'AFNetworking+RetryPolicy'`\n- Use `#import \"AFHTTPSessionManager+RetryPolicy.h\"` directive.\n\n\u003e Want to try it first? Use `pod try AFNetworking+RetryPolicy` command.\n\n## Usage\n### Example\n- Simple `GET` request with **AFNetworking+RetryPolicy** could look like this:\n\n```objective-c\n    AFHTTPSessionManager *manager = [AFHTTPSessionManager new];\n    [manager GET:@\"foo\" parameters:nil headers:nil progress:nil success:^(NSURLSessionDataTask *task, id responseObject) {\n        NSLog(@\"%@\", responseObject);\n        \n    } failure:^(NSURLSessionDataTask *task, NSError *error) {\n        NSLog(@\"%@\", error.localizedDescription);\n        \n    } retryCount:5 retryInterval:2.0 progressive:false fatalStatusCodes:@[@401, @403]];\n```\n### Log \n- Enable to see what is happening by setting the `AFHTTPSessionManager`’s `retryPolicyLogMessagesEnabled` property to `true`. *Disabled by default.*\n\n## Requirements\n- **[AFNetworking](https://github.com/AFNetworking/AFNetworking) 4.0 or later**\n- Target iOS 9 or later\n- Target OS X/macOS 10.10 or later\n- Xcode 11 or later\n\n## Old versions\n#### For [AFNetworking](https://github.com/AFNetworking/AFNetworking) 3 support\n- use version 1.x.\n\n#### For [AFNetworking](https://github.com/AFNetworking/AFNetworking) 2 support\\*\n- use branch [`afn2-support`](https://github.com/kubatru/AFNetworking-RetryPolicy/tree/afn2-support).\n- Installing through **[CocoaPods](https://cocoapods.org/)** with `pod 'AFNetworking+RetryPolicy', git: 'https://github.com/kubatruhlar/AFNetworking-RetryPolicy.git' , branch: 'afn2-support'`\n\n\u003e \\*Will not be updated anymore.\n\n#### For [AFNetworking](https://github.com/AFNetworking/AFNetworking) 1 support\\*\n- use branch [`afn1-support`](https://github.com/kubatru/AFNetworking-RetryPolicy/tree/afn1-support).\n- Installing through **[CocoaPods](https://cocoapods.org/)** with `pod 'AFNetworking+RetryPolicy', git: 'https://github.com/kubatruhlar/AFNetworking-RetryPolicy.git' , branch: 'afn1-support'`\n\n\u003e \\*Will not be updated anymore.\n\n## Author and credit\n- This library is open-sourced and maintained by [Jakub Truhlář](http://kubatruhlar.cz).\n- AFNetworking is owned and maintained by the [Alamofire Software Foundation](http://alamofire.org).\n    \n## License\n- Like :+1: [AFNetworking](https://github.com/AFNetworking/AFNetworking), this category is published under the MIT License. See LICENSE.md for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkubatruhlar%2FAFNetworking-RetryPolicy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkubatruhlar%2FAFNetworking-RetryPolicy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkubatruhlar%2FAFNetworking-RetryPolicy/lists"}