DeleteMapping request

Report a typo

Select the DELETE request that is valid for the @DeleteMapping implemented below.

Java
@RestController
public class CustomerController {
    private ConcurrentMap<String, String> customers = new ConcurrentHashMap<>();
	
    @DeleteMapping("/customers")
    public String removeCustomer(@RequestParam String name) {
        customers.remove(name);
        return name + " customer removed!";
    }
}
Kotlin
@RestController
class CustomerController {
    private val customers = ConcurrentHashMap<String, String>()
    
    @DeleteMapping("/customers")
    fun removeCustomer(@RequestParam name: String): String {
        customers.remove(name)
        return "$name customer removed!"
    }
}
Select one option from the list
___

Create a free account to access the full topic