Post mapping

Report a typo

Complete the POST mapping below:

Java
@RestController
public class MovieController {
    private ConcurrentMap<String, Integer> movieMap = new ConcurrentHashMap<>();
	
    _________("/movies")
    public void postMovie(@RequestParam String name, @RequestParam int rating) {
        movieMap.put(name, rating);
    }		
}
Kotlin
@RestController
class MovieController {
    private val movieMap = ConcurrentHashMap<String, Integer>();

    _________("/movies")
    fun postMovie(@RequestParam name: String, @RequestParam rating: Int) {
        movieMap[name] = rating;
    }
}
Select one option from the list
___

Create a free account to access the full topic