title: Can't read custom header in HttpResponse from HttpClient in a Ionic Angular application
body: <p>I'm requesting an endpoint that creates a new resource and returns a 201 response containing a "Location" header with the newly created resource:</p>
  
  <p><a href="https://i.stack.imgur.com/KTr4H.png" rel="noreferrer"><img src="https://i.stack.imgur.com/KTr4H.png" alt="Network inspecting on Chrome"></a></p>
  
  <p>However, when I try to get header value as described in <a href="https://angular.io/guide/http#reading-the-full-response" rel="noreferrer">Angular guide</a>, I get a "null" value instead of the actual value. Here is my code (note: I'm setting responseType:'text' to avoid Json parsing error as the response body is empty):</p>
  
  <pre><code>(...)
  import { HttpClient } from '@angular/common/http';
  
  (...)
  
    constructor(public navCtrl: NavController, public navParams: NavParams, public http: HttpClient) {
    }
  
    ionViewDidLoad() {
      let obj = {nome : "SomeName"}
      this.http.post("http://localhost:8080/categorias", obj, {observe: 'response', responseType: 'text'})
      .subscribe(
          (resp) =&gt; {
            console.log(resp.headers.get('Location'));
          }
        );
    }
  </code></pre>
  
  <p>I even tried console.log(resp.headers) in order to check this object, and it shows a completely different structure:</p>
  
  <p><a href="https://i.stack.imgur.com/BIkX5.png" rel="noreferrer"><img src="https://i.stack.imgur.com/BIkX5.png" alt="enter image description here"></a></p>
  
  <p>How can I get a custom header from a HttpResponse object from the new HttpClient Angular API?</p>