I have wrote search(filter) method and sent data for filtering in RequestParam, but my team lead says it is not right way, he says filtering data must be sent in RequestBody and http method must be POST
Controller method I have wrote:
@GetMapping("/total-student-list")
public ResponseEntity<List<TotalStudentReportDto>> totalStudentList(TotalStudentFilterDto dto){
return ResponseEntity.ok(reportService.totalStudentList(dto));
}
Is there any role that says it must be in post method and must be sent in RequestBody?
Which way is considered more prominent ?