angularjs中的$http怎么发送带参数的请求

2025-03-09 10:01:54
推荐回答(1个)
回答1:

$http({
method : 'POST',
params :{ userId : userId},
headers : { 'Content-Type': 'application/x-www-form-urlencoded' }
}).success(function(res){
// 回调函数

})