Better way to retry curl