Problem with accessing headers value
See original GitHub issueI have problem with accessing headers value. I can only read value of content-type
. Am I doing something wrong?
I have code like this
return fetch(url)
.then(response => {
debugger;
console.log(response.headers.get('Content-Type'))
console.log(response.headers.get('Date'))
return response;
})
.then(processStatus);
which prints:
application/json; charset=utf-8
null
I have es6-promise
installed, also added import "babel-polyfill";
on beginning of my scripts.
I am using latest version which is 2.2.1
Issue Analytics
- State:
- Created 7 years ago
- Reactions:3
- Comments:6
Top Results From Across the Web
Access-Control-Request-Headers - HTTP - MDN Web Docs
The Access-Control-Request-Headers request header is used by browsers when issuing a preflight request to let the server know which HTTP ...
Read more >having trouble reading header values in classic ASP
I found my answer. When I ran this loop <% for each x in Request.ServerVariables response.write("<B>" & x & ":</b> " & Request....
Read more >Access multi-value HTTP headers incorrectly in an API Proxy
Accessing the values of HTTP headers in Edge policies in a way that returns only the first value is incorrect and can cause...
Read more >Unable to access the HttpServletRequest headers value ... - IBM
While attempting to access HttpServletRequest header value (such as "serviceID") in Faces Portlets before the JSP page is rendered, this value is not...
Read more >Access multi-value HTTP headers incorrectly in an API Proxy ...
Accessing the values of HTTP headers in Apigee policies in a way that returns only the first value is incorrect and can cause...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
My above issue was resolved in the same way as @fuglu. I had to add the header I was trying to access to the
Access-Control-Expose-Headers
header.@fuglu what’s the point to set
Location
HTTP header in this case? I don’t want to set a HTTP redirect nor I created something to define this variable, this is doesn’t make any sense to me 😦 also the solution didn’t work using it with electron.