Complete the Request Body

Report a typo

Complete the code to allow it to accept a request body:

Java
@RestController
public class UserInfoController {
    
    @PostMapping("/book")
    public String addBook(________ Book book){
        return "Book added!";
    }
}
Kotlin
@RestController
class UserInfoController {

    @PostMapping("/book")
    fun addBook(________ book: Book): String {
        return "Book added!"
    }
}
Select one option from the list
___

Create a free account to access the full topic