DEV Community

Discussion on: How do we access response headers in Javascript ?

Collapse
 
ronnymedina profile image
Ronny Medina

Do you have an example of this?

Collapse
 
dhanushnehru profile image
Dhanush N • Edited

In my node server
I have did like res.set( correlationid, 12345)
I need to access the value from frontend react, response.headers in frontend not able to get the correlationid

Collapse
 
ronnymedina profile image
Ronny Medina

Do you want to set headers on the node?, maybe this example could be used
stackoverflow.com/questions/767626...

or

// https://www.geeksforgeeks.org/express-js-res-set-function/
res.set({ 'correlationid': '12345'}); 
Enter fullscreen mode Exit fullscreen mode