Connect the request path with the number of a handling method description:
Java
-
@GetMapping(path = "/movies/{movieId}/comments") public List<String> getComments(@PathVariable String movieId) -
@GetMapping("/movies/{id}") public Movie getMovie(@PathVariable String id) -
@PostMapping("/movies/{movieId}/comments") public void comment(@PathVariable String movieId, @RequestBody String comment) -
@PostMapping("/movies") public void addMovie(@RequestBody Movie movie)
Kotlin
-
@GetMapping("/movies/{movieId}/comments") fun getComments(@PathVariable movieId: String): List<String> -
@GetMapping("/movies/{id}") fun getMovie(@PathVariable id: String): Movie -
@PostMapping("/movies/{movieId}/comments") fun comment(@PathVariable movieId: String, @RequestBody comment: String) -
@PostMapping("/movies") fun addMovie(@RequestBody movie: Movie)