Home | History | Annotate | Download | only in image_loader

Lines Matching defs:xhr

197   // Fetch the image via authorized XHR and parse it.
209 // Request raw data via XHR.
303 * @return {AuthorizedXHR} XHR instance.
307 var xhr = new XMLHttpRequest();
308 xhr.responseType = 'blob';
310 xhr.onreadystatechange = function() {
311 if (xhr.readyState != 4)
313 if (xhr.status != 200) {
314 onFailure(xhr.status);
317 var contentType = xhr.getResponseHeader('Content-Type');
318 onSuccess(contentType, xhr.response);
321 // Perform a xhr request.
323 xhr.open('GET', url, true);
325 xhr.setRequestHeader('Authorization', 'Bearer ' + token);
326 xhr.send();
331 return xhr;