In spring framework, @GetMapping doesn't have a body. But it has a 'consumes' attribute. So how does it use this attribute without a body?
example:
@GetMapping(value = "/methodA", consumes = "application/json")
In spring framework, @GetMapping doesn't have a body. But it has a 'consumes' attribute. So how does it use this attribute without a body?
example:
@GetMapping(value = "/methodA", consumes = "application/json")
You can read queryParam/Request HTTP header as below:
@GetMapping(value = "{URL}")
public ResponseEntity getMethod(@RequestParam("consumes") String consumes) {
return ResponseEntity.ok().build();
}