I am working with Angular 2 and I am trying to send HTTP request with credentials:
This Angular 1 code works well, it includes the credentials:
$http.get("http://some.com/user",{ withCredentials: true})
According to the API preview I have implemented this Angular 2 code but it does not include credentials:
http.get("http://some.com/user", {
headers: myHeaders,
credentials: RequestCredentialsOpts.Include
}).toRx()
.map(res => res.json())
.subscribe(
// onNext callback
data => this.successHandler(data),
// onError callback
err => this.failure(err)
);
I am working with Angular 2.0.0-alpha.37.