2
我可以看到withCredentials: true
is implemented in angular 2 now角2個GET withCredentials(接受來自服務器的cookies)
要接受來自服務器的cookies。
但是我不知道我該如何使用它。
我試圖
this.http.get(API_PATH + 'auth/getSession/' + TOKEN, {
withCredentials: true
})
但西蘭花拋出錯誤
Argument of type '{ withCredentials: boolean; }' is not assignable to parameter of type 'RequestOptionsArgs'
我用角CLI的1.0.0-beta.6。
什麼版本的Angular 2在'packages.json'中使用? – rinukkusu