I have defined a method like this
@RequestMapping(value="/multiRquestBody",method=RequestMethod.POST)
public String multiRquestBodyMethod(@RequestBody String[] body1,@RequestBody String[] body2){
System.out.println("body1 : "+body1);
System.out.println("body 2 : "+body2);
return Arrays.toString(body1)+"------"+Arrays.toString(body2);
}
I used curl command like this to call that method
curl -X POST "http://localhost:7979/choudhury-rest/rest/book/multiRquestBody" -d '["test","test","test"],["testing","testing string array"]' -H "Content-Type: application/json"
Then I got an error like this
The request sent by the client was syntactically incorrect.
I have tried another way like
curl -X POST "http://localhost:7979/choudhury-rest/rest/book/multiRquestBody" -d '["test","test","test"]&["testing","testing string array"]' -H "Content-Type: application/json"
But still, the same issue is coming how can I solve it