Is there a way to make the @RequestBody annotation options (e.g. required=false) like RequestParam supports?
My main path through the code is with a POST. However, I’d like to also support a basic GET request via a browser basic http request for debugging purposes. However when I try to do that I get a 415 unsupported media error.
To do this, use the
methodattribute of the@RequestMappingannotation, e.g.