title: Http Request headers not working properly, Angular 5
body: <p>I'm building an Angular 5 app where I am making an api request to an external server. I am trying to hard-code some headers, including content-type and an 'x-api-key'. In postman, the request works perfectly, so I know I have the correct information. </p>
  
  <p>The issue is that I will add headers to the request, and when I console.log the request options it will show them in an array, but upon inspecting it in the network tab, it will only show the titles of the headers I included (content-type and x-api-key) and not the values themselves. I receive a 403/forbidden error, so I know the API recognizes the request but I"m not authorized to get the information. See below- 
  <a href="https://i.stack.imgur.com/8nSxr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8nSxr.png" alt="enter image description here"></a></p>
  
  <p>Here's how I'm adding the headers:</p>
  
  <p>auth.service.ts</p>
  
  <pre><code>  createAuthorizationHeader(headers: Headers) {
      headers.append('Authorization', 'Basic ' + btoa('username:password')); 
      headers.append('x-api-key', '...');
      headers.append('Content-type', 'application/json')
   }
  </code></pre>
  
  <p>then where I call the api-</p>
  
  <pre><code> logInUser(signInData: { username: string, password: string }): Observable&lt;Response&gt; {
    let headers2 = new Headers();
    this.createAuthorizationHeader(headers2);
    return this.authService.post('http://api_url.com', signInData,{
    headers: headers2
  })
  </code></pre>
  
  <p>When I console.log the request options:
  <a href="https://i.stack.imgur.com/TUFJ1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TUFJ1.png" alt="enter image description here"></a></p>
  
  <p>How might I restructure things so that the full values of my headers will be recognized in my request? Any information will help!  THANK YOU</p>
  
  <p>p.s. I previously was using a Rails API, so in order to connect I would use the Angular2Token Module along with the 'cors' gem to make requests, so I am trying to transition away from it.</p>