I have this request:
$http({
method: 'get',
url: '/api/items/',
params: {a: 1, b: 2, c: 3}
}).success(function (response) {
console.log(response);
}).error(function (err) {
console.log(err);
});
有没有一种方法,在请求已经发出后(在回调函数或其他方式中),获取它所使用的URL? 我希望输出结果如下:
http://www.example.org/api/items?a=1&b=2&c=3
这里使用jquery完成同样的事情。
params
不起作用了吗? - Endre Simo