对参数进行序列化
$http({
method: "POST",
url: "http://192.168.2.2:8080/setId",
data: {cellphoneId: "b373fed6be325f7"},
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
transformRequest: function(obj) {
var str = [];
for (var s in obj) {
str.push(encodeURIComponent(s) + "=" + encodeURIComponent(obj[s]));
}
return str.join("&");
}
}).success();