1

I need to get all response headers via following codes but it only returns 4 of them in response.

Example: https://jsfiddle.net/xy9dch7g/

axios
  .head('https://jsonplaceholder.typicode.com/todos/1')
  .then(response => {
    console.log(response)
  })

Axios returned headers: http://take.ms/5KqEBn

Expected headers: http://take.ms/SFVyl

double-beep
  • 5,031
  • 17
  • 33
  • 41
user3631047
  • 3,256
  • 5
  • 23
  • 34

1 Answers1

1

If you would like your client app to be able to access other headers, you need to set the Access-Control-Expose-Headers header on the server:

Try this reference

sathish kumar
  • 1,477
  • 1
  • 11
  • 18
  • yes, that's right, I found the answer here: https://stackoverflow.com/questions/37897523/axios-get-access-to-response-header-fields – user3631047 Feb 23 '19 at 08:46