0

When the React app. is loaded, I am able to get the query param from the current page's url through `window.location.search'. Similarly, I want to read the request headers. How to read the request headers in React?

MAK
  • 1,303
  • 3
  • 13
  • 31

1 Answers1

1

It's not possible to get request headers of the page in React, without sending a http request via javascript.

Refer answers:
https://stackoverflow.com/questions/44354763/how-do-i-get-http-headers-in-react-js
How can I read the current headers without making a new request with JS?

Bensu Rachel
  • 174
  • 1
  • 5