Annotation Interface RequestBody
Annotation indicating that the request's body should be parsed in
a request mapping and made available in the associated method parameter.
Example
@ApiEndpoint("/api")
public class MyController {
// Incoming request looks like "/api/user" and contains an HTTP JSON body
@PostMapping("/user")
public void createNewUser(@RequestBody UserInfo userInfo) {
// Create the new user using the populated userInfo object.
}
}
- Since:
- 1.0
- Version:
- 2023-02-16
-
Optional Element Summary
Optional Elements
-
Element Details
-
value
Class[] valueOptional JSON view to apply to the body.- Default:
- {}
-