Renamed the 'retries' parameter to 'attempts' and fixed an issue where the method would attempt the request one more time than expected