I use axios to retrieve some data from backend. I send a request and i have a response. I want to read some of my headers. I've tried many things but no one is working.
My headers contains the following headers 'content-type', content-length', 'x-wp-total', 'x-wp-totalpages'
.
I've tried to get headers using response.headers('content-type')
but i am getting error response.headers is not function. I am in trouble.
My question seem to be simple. Which is the syntax to get headers from response ?