title: How to pass parameters in headers
body: <p>I need to call an API from my Angular Node application.For that i have to pass username and password along with header request.How to pass parameters?
  I tried below code</p>
  
  <p>From Angular service,</p>
  
  <pre><code>checkUserApi(url: string): Observable&lt;any&gt; {    
     const headers = new HttpHeaders()
      .set('Authorization', 'my-auth-token')
      .set('Content-Type', 'application/json')
      .set('userName','prismtest')
      .set('password','12345678');
     return this.http.post('/upload/checkUserApi/', { headers })
    .map((response: Response) =&gt; {
      console.log(response);
     return response;
     })
  }
  </code></pre>
  
  <p>In Node,</p>
  
  <pre><code>router.post('/checkUserApi',function(req,res,next){
  var proxyUrl = 'http://cors-anywhere.herokuapp.com/';
  
  Request.post({
    "headers": { "userName": "prismtest","password":"12345678" },
    "url": proxyUrl+"https://example.com",
    "body": {}
    }, (error, response, body) =&gt; {  
  
    if(error) {
     return console.log(error);
    }  
     res.send(response);
    });
    });
  </code></pre>