refactored code to use delete request

Signed-off-by: Bebe Peng <bebepeng@gmail.com>