AngularJS withCredentials

前端 未结 3 1296
失恋的感觉
失恋的感觉 2020-12-02 22:38

I\'ve been working on an AngularJS project which has to send AJAX calls to an restfull webservice. This webservice is on another domain so I had to enable cors on the server

3条回答
  •  孤城傲影
    2020-12-02 23:00

    Clarification:

    $http.post(url, {withCredentials: true, ...}) 
    

    should be

    $http.post(url, data, {withCredentials: true, ...})
    

    as per https://docs.angularjs.org/api/ng/service/$http

提交回复
热议问题