I\'m in a Google Chrome extension with permissions for \"*://*/*\" and I\'m trying to make the switch from XMLHttpRequest to the Fetch API.
The extensio
For backward compatibility with browsers that do not support ES2015 iterators (and probably also need fetch/Promise polyfills), the Headers.forEach function is the best option:
r.headers.forEach(function(value, name) {
console.log(name + ": " + value);
});
Tested in IE11 with Bluebird as Promise polyfill and whatwg-fetch as fetch polyfill. Headers.entries(), Headers.keys() and Headers.values() does not work.