0
i create an spring/angularjs application but i have some problems with "post",when i tried to test the controller without angularjs i had this messageHTTP POST JSON(春/ angularjs)
[这是我的angularjs APP] [3]
$scope.ajouter_employe=function(){
$http({
method: 'POST',
url: "/employe1",
headers: {'Content-Type': 'application/json'},
data: {idEmploye: $scope.idEmploye}
}).then(function(response){
alert('yes');
});
}
它不起作用 { “时间戳”:1495521855274, “状态”:415, “错误”: “不支持的媒体类型”, “异常”:“org.springframework当我尝试测试我控制器3210仍然有这个消息。 web.HttpMediaTypeNotSupportedException”, “消息”: “内容类型 '多部分/格式数据;边界= ---- WebKitFormBoundaryShaAnQBDa47tg35j' 不支持”, “路径”: “/ employe1” }当我尝试 “获取”它工作正常! – hich