I want to read my custom header in HTTP Get response but I only have ‘cache-control’ header, while sending the same request in Postman returns much more headers.

Returned response in Angular:

r/webdev - [Angular] lack of custom headers in http response

Retured response in Postman:

r/webdev - [Angular] lack of custom headers in http response

Way I’m sending request in Angular:

const headers = new HttpHeaders({
  'Content-Type' : 'application/json',
  'Authorization': token
});

return this.http.get<any>(`${this.serviceUrl}/authorize`, { headers, observe: 'response', responseType: 'text' as 'json' });

Mostly I care about ‘Authenticated’ header. How can I retrive this?



Source link

Write A Comment