title: angular 5 httpclient , on post , the response does not return headers, only returns response object
body: <p>I recently moved to angular 5 and earlier the http.post was returning the response objecta s complete with headers however using httpclient , it does not return the response headers. How can i change this part of the post code to provide the complete response object including response headers</p>
  
  <p>I read about  using {observable: "response"} , but its not working</p>
  
  <pre><code>post(inURL,  data, config = undefined)  {
    let headers, options;
    if (config) {
      options = config;
    } else {
      //headers = this.getDefaultHeader();
      //options = new RequestOptions({ headers: headers });
      options = httpOptions;
    }
  
    let action = this.httpService.post(inURL,  data, options);
    return new Promise((resolve, reject) =&gt; {
      action.subscribe(
        response =&gt; resolve(response),
        error =&gt; {
          this.interceptError(error);
          reject(error);
        }
      );
    });    
  }
  </code></pre>