So Let's say that I have an endpoint:
POST /answer
Currently It only receives one answer from user.
{
"question": "3+5",
"answer": "8"
}
I'm curious It is possible to receive multiple answers, for the same endpoint.
[
{
"question": "3+5",
"answer": "8"
},
{
"question": "9+3",
"answer": "12"
}
]
I'm using Spring Boot 1.5.1. Here's the controller code that I'm using:
@RequestMapping(value = "/answer", method = RequestMethod.POST)
public Response submitAnswer(SubmitAnswerRq rq) {
return service.submitAnswer(rq);
}
Any ideas?
(@RequestBody SubmitAnswerRq[] rq)