title: How to set header to HttpHeaders in angular 5
body: <p>I'm trying to figure out how to handle headers on HttpHeaders to use them for http requests via HttpClient.</p>
  
  <pre><code>const headers = new HttpHeaders();
  headers.append('foo', 'bar');
  headers.set('foo', 'bar');
  
  console.log(headers.get('foo')) // null
  </code></pre>
  
  <p>it works only this way:</p>
  
  <pre><code>const headers = new HttpHeaders().set('foo', 'bar');
  console.log(headers.get('foo')) // bar
  </code></pre>
  
  <p>Is there a special way to add headers? Or it is a bug?</p>