Use XMLHttpRequest for API calls
Sample success/error callbacks