在axios中重写jquery ajax请求并设置xhrFields

时间:2017-08-09 11:30:53

标签: vue.js axios

我有jquery请求

$.ajax({
    type: "GET",
    url: "http://6232423.212342343.100.89:9000/api/v2/content/categories/",
    xhrFields: {
        withCredentials: true
    },
});

我如何在axios中做同样的事情? 我试过这样:

axios.get(portal.categoriesUrl,
          {xhrFields: {
        withCredentials: true
    }}
)

但没有效果

1 个答案:

答案 0 :(得分:1)

相关问题