0

I am trying to get the location header in the response from an post like this:

this.httpClient.post<Response>(url, data, { observe: 'response'}).subscribe(response => {
     const locationHeader = response.headers.get('Location');     
});

But no headers are available. Inspecting the traffic in fiddler verifies that the headers are there in the response... Why are the Location header not appearing in the headers property in the httpclient?

options request

post with location in response

Edit 1: Using azure functions emulator locally for backend api. My understanding is that this by default is supposed to allow all headers based on this: Configuring Access-Control-Allow-Headers in Azure Functions

Edit 2: Images from sample request with headers.

Oddleif
  • 751
  • 3
  • 9
  • 35
  • 1
    Possible duplicate of [Reading Custom HTTP response headers in Angular 2](https://stackoverflow.com/questions/44946396/reading-custom-http-response-headers-in-angular-2) – GreyBeardedGeek Dec 31 '17 at 17:56
  • Using azure functions emulator locally for backend api. My understanding is that this by default is supposed to allow all headers... – Oddleif Jan 03 '18 at 10:01

0 Answers0