An interceptor for Polymer's iron-request element that generates events on document object.
Include in your polymer application.
<script src="../../bower_components/xhr-events/xhr-events.js"></script>
Add event listeners for xhr.
document.addEventListener('xhr-request', function(event) {
console.log('xhr-request', event.detail);
});
document.addEventListener('xhr-response', function(event) {
console.log('xhr-response', event.detail);
});
document.addEventListener('xhr-error', function(event) {
console.log('xhr-error', event.detail);
});
For IE, use this polyfill