I have a mapping in my Spring application that looks like this:
@PutMapping(path="/test/{id}")
public @ResponseBody Shop putTest(@PathVariable("id") long id,
@RequestBody User user {
....
When trying to call this endpoint with Angular by doing:
$http({
method: 'PUT',
url: 'https://localhost:8000/api/test',
data: senddata,
params:{'id':id},
headers: {
"Content-Type": "application/json; charset=utf-8"
}
})
Is there something wrong with my request, if so how can I fix it?