我使用axios版本0.13.1,如果我想获取带有orderBy
和limitToFirst
参数的数据,我收到400 Bad请求错误。
使用此http请求,我收到400错误:
axios({
method: 'get',
url: 'https://tracker-ag.firebaseio.com/groups.json',
params: {
auth: AccessStore.getToken(),
orderBy: "$key",
limitToFirst: 2,
}
}).then(function (response) {
responseHandler(USERS_GET, '', response.data);
})
.catch(function (error) {
console.log("Error during fetching data " + error.message);
});
没有orderBy和limitToFirst参数的http请求有效:
axios({
method: 'get',
url: 'https://tracker-ag.firebaseio.com/groups.json',
params: {
auth: AccessStore.getToken(),
}
}).then(function (response) {
responseHandler(USERS_GET, '', response.data);
})
.catch(function (error) {
console.log("Error during fetching data " + error.message);
});