See*_*rma 8 javascript patch angularjs
以下是我的代码:
$http({
url: 'https://apistage.dealsignal.com/api/v0/company_watchlists/' + wishlist_id,
method: 'PATCH',
params: {
list: {
add_company_ids: ['61737'],
name: 'My Wishlist'
},
api_key: 'CtxY3Kpc7ZDL8VDfLmPt9wss'
}
})
.success(function(response) {
console.log(response);
}).
error(function(response) {
console.log(response);
return false;
});
Run Code Online (Sandbox Code Playgroud)
我收到错误的请求错误,但补丁方法的相同请求正在Chrome上的REST CLIENT中工作.
请参阅Angular Doc.这将是Data not params.
$http({
url: 'https://apistage.dealsignal.com/api/v0/company_watchlists/' + wishlist_id,
method: 'PATCH',
data: {
list: {
add_company_ids: ['61737'],
name: 'My Wishlist'
},
api_key: 'CtxY3Kpc7ZDL8VDfLmPt9wss'
}
}).success(function(response) {
console.log(response);
}).
error(function(response) {
console.log(response);
return false;
});
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2062 次 |
| 最近记录: |