title: How to set headers while requesting a page in nodejs?
body: <p>I saw many tutorials on jwt authentication but every video maker uses Postman to show what's happening and they pass on the header in the headers section while requesting a URL in Postman. I tried to do it with JavaScript but I was not able to do it.</p>
  
  <p>I want to do jwt authentication but after token generation, I send it to client side to use it for further requests but I failed to do so after trying it a few times. I also tried to set req.headers in server side but it didn't do what I wanted to..</p>
  
  <p>I want to set request headers for authentication of the form "Bearer {token}" for every request after token generation. How to do it with JS??</p>
  
  <p>What I am most concerned about is that every tutorial does it with postman but they didn't show how they implemented it in their own app. I hope my question is clear.</p>