title: How to get 'Authorization' Header in Angular 5
body: <p>I have Spring-Boot JWT enabled REST APIs. Authentication API /login does provide All the CORS and AUTH headers as expected. Tested with Curl and Postman.
  My Client code is in Angular 5. When successfully authenticated I can see - </p>
  
  <ol>
  <li>All the required headers, specifically 'Authorization' header in Developer Tools of Chrome in Network Traffic.</li>
  <li>However when accessed with Angular 5 HttpClient no Header is accessible in Component/Service.</li>
  </ol>
  
  <p>Note: Backend side, CORS and Allow Headers is enabled, and hence Chrome Network Traffic is fine.</p>
  
  <p>Added the required options in HttpClient during POST call.</p>
  
  <pre><code>{
       responseType: 'text',
       observe: 'response'
  }
  </code></pre>
  
  <p>Tried with all possible responseType there.
  JSON, as default, throws Parse Exceptions.
  It means the default Spring-Boot JWTS /login API does not return JSON Output but returns only HttpResponse. </p>
  
  <p>Please help... </p>
  
  <p>Angular Code - </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>login(payload: any): Observable &lt; any &gt; {
  
      return this._http.post(this.loginEndPoint, payload, {
          responseType: 'text',
          observe: 'response'
      })
          /* .map((response: HttpResponse&lt;string&gt;) =&gt; {
              console.log(response.headers.get('Authorization'));
              return response;
          }); */
          .pipe(
          tap(response =&gt; {
              console.log(response.headers.get('Authorization'));
              return response;
          }),
          catchError(this.handleError('getHeroes', []))
          );
  }</code></pre>
  </div>
  </div>
  </p>