How to get Header Location value from a Fetch request in browser
<p>From a ReactJS - Redux front app, I try to get the Location Header value of an REST API response.</p>

<p>When I Curl this : </p>

<pre><code>curl -i -X POST -H "Authorization: Bearer MYTOKEN" https://url.company.com/api/v1.0/tasks/
</code></pre>

<p>I Have this answer :</p>

<pre><code>HTTP/1.1 202 ACCEPTED
Server: nginx
Date: Fri, 12 Aug 2016 15:55:47 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 0
Connection: keep-alive
Location: https://url.company.com/api/v1.0/tasks/status/idstatus
</code></pre>

<p>When I make a Fetch in ReactJS</p>

<pre><code>    var url = 'https://url.company.com/api/v1.0/tasks/'
    fetch(url, {
            method: 'post',
            credentials: 'omit',
                headers: {
                    'Authorization': `Bearer ${token}`
                }
            }
     )
</code></pre>

<p>I don't have any Headers in the response object : 
<a href="https://i.stack.imgur.com/cQyG5.png" rel="noreferrer">No header in Fetch request</a></p>

<p>I tried all the response.headers functions I've found in <a href="https://developer.mozilla.org/en-US/docs/Web/API/Headers" rel="noreferrer">https://developer.mozilla.org/en-US/docs/Web/API/Headers</a> :</p>

<pre><code>response.headers.get('Location');
</code></pre>

<p>But well, as headers is empty, I have empty results.</p>

<p>Do you know why I can't get a proper Header object filled with the headers values ?</p>