【发布时间】:2018-08-25 10:56:11
【问题描述】:
我有角码
app.controller('add', function ($scope, $http) {
$scope.add = function() {
$scope.msg = "no connect";
var data = {name:'soso',description:'buba',method:'POST'};
$http.post(host + "/add-component",data)
.then(function (response) {
$scope.msg = response.data;
});
}
});
在我的 servlet 中,我想捕获它
resp.setContentType("application/json; charset = utf8");
String name = req.getParameter("name");
String description = req.getParameter("description");
但我的名字和描述都 = null;
【问题讨论】:
标签: java angularjs http servlets