Add method to retry requests.