【问题标题】:Restangular does support withCredentials options and the other options for a cors request?Restangular 是否支持 withCredentials 选项和 cors 请求的其他选项?
【发布时间】:2013-10-19 21:17:25
【问题描述】:

我在谷歌上搜索,但我没有找到任何线索

restangular 是否支持 credentials 选项和 cors 请求的其他选项。

我的意思是我可以在没有任何问题的情况下在 cors 通话中使用它吗?

你能帮帮我吗?

【问题讨论】:

    标签: angularjs cors restangular


    【解决方案1】:

    是的。

    您可以使用setDefaultHttpFieldshttps://github.com/mgonto/restangular#setdefaulthttpfields进行设置

    它与 $http 值的格式相同。

    【讨论】:

    • 非常感谢 RestangularProvider.setDefaultHttpFields({withCredentials: true}); ?
    • 没错,就是这样
    猜你喜欢
    • 2016-08-09
    • 2016-06-26
    • 2013-11-09
    • 2018-07-24
    • 2012-11-11
    • 1970-01-01
    • 2018-07-03
    • 1970-01-01
    • 2023-04-04
    相关资源
    最近更新 更多