I am trying to send an array
arr=["xxx.yyy","zzz.vvv"]
to spring endpoint like this:
$http.post("url",arr)
spring side:
@PostMapping(value = "url")
public Set<String> func(@RequestParam(name="arr") String[] arr) {
}
however I keep on recieveing
org.springframework.web.bind.MissingServletRequestParameterException: Required String[] parameter 'arr' is not present
how can I acces the array by the parameter name? I need to send a few arrays, so I assume they could be referenced by their names, however @RequestParam doesn't seem to work
From what I see from the spring documentation:
As post send the information in the request body, try using the latest one:
You may also need to modify the angular part as: