What if I use @PostMapping for fetch request instead of @GetMapping? What is the additional thing I need to add to make this API work
Like in my case
@PostMapping("/get/{userId}")
public ResponseEntity<UerDto> getUSerById(@PathVariable Integer userId){
return new ResponseEntity<UserDto>(userService.getUserById(userId),HttpStatus.OK);
}
I need to know what parameters I need to pass to make this work.
I try to get a JSON output, but was encountering an error.