Added the ability to abort an API call