我正在使用angularjs构建我的应用程序,在我的应用程序中,我正在调用一个rest api,我需要将用户名和密码作为用户凭据传递,我使用$ http进行get和post操作。现在我在调用webservice时会给我的用户凭据详细信息。请提供一些示例和有用的链接。
谢谢和问候
Utpal
答案 0 :(得分:1)
如[{3}}所述,其中一种方式可能是:
$http.get(url, { withCredentials: true, });
摘录:
withCredentials - {boolean} - 是否在XHR对象上设置withCredentials标志。有关详细信息,请参阅带凭据的请求。