An extension to HTTParty ( Adds Retry capabilities).
Retries HTTP request upto 3 times by default in case of failures and timeouts.
Default Trials : 3
Default Sleep Interval : 3 seconds
Install HTTParty.
gem install httparty
Does everything that HTTParty does.
All you got to do is replace the name from HTTParty to ExtendedHttparty.
From :
response = HTTParty.get('http://api.stackexchange.com/2.2/questions?site=stackoverflow')
To :
response = ExtendedHttparty.get('http://api.stackexchange.com/2.2/questions?site=stackoverflow')
You can update the number of trials by passing an integer value as the parameter.
response = ExtendedHttparty.get('your-url', tries: 5)