adds a retry feature to the curl command