refactor($http) Use onload/onerror/onabort instead of onreadystatechange