Turns a Headers instance into a plain JS object to be able to log it or interact with it more easily

Array.from(headers.keys()).reduce((acc, key) => Object.assign(acc, { [key]: headers.get(key) }), {})