REST API - DELETE

Seunghwan Choi·2024년 10월 28일

Java Backend

목록 보기
5/16

  • Purpose of the DELETE method is to remove a resource at a specified URI.
  • It is idempotent, meaning that making the same DELETE request multiple times has the same effect as making it once.
@DeleteMapping(path = "/user/{userName}/delete")
    public void delete(
            @PathVariable String userName
    ){
        log.info("user-name: {}", userName);
    }
http://localhost:8080/api/user/seunghwan/delete
//above request logs the following:
user-name: seunghwan

0개의 댓글