While working on my google chrome extension, I implemented a post call that looks like this:
public someapiCall(username: string, password: string) {
var url = 'http://test.someTestServer.com/api/user/someApiCall';
let headers = new Headers({
"Content-Type": "application/x-www-form-urlencoded"
});
let options = new RequestOptions({ headers: headers, withCredentials: true });
return this.http.post(url, 'UserName=' + username + '&Password=' + password, options)
.map(res => {
console.log(res);
let cookies = res.headers.getAll('set-cookie');
console.log(cookies);
})
.catch(this.handleError);
}
However, when I make the call, fiddler displays response headers as shown in this image.
The issue arises when I check the Response object printed in the console but find no header referencing cookies. Can anyone help me identify where the problem lies?