[whatwg/fetch] Lack of warning when reading headers (#471)

When doing:
`fetch('http://localhost:3000/login', {method:'POST', headers: {'Content-Type': 'application/json', 
            Accept:'*/json'}, body: JSON.stringify({email:'foo', password:'bar'})}).then(x => {console.log(11, x.headers.get('authorization')); return x.json()}).then(console.log)`

it logs: "11 null" even though I see the authorization header in network tab

when using XmlHttpRequest, it's the same with a helpful warning:
> Refused to get unsafe header "authorization

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/issues/471

Received on Sunday, 29 January 2017 20:32:56 UTC