리소스의 삭제 (멱등성, 안정성 없음)
get와 동일 하다고 생각하면되고 항상 200 OK를 리턴 값이 있던지 없던지 삭제하고 반환
package com.example.deleteapi.controller;
import org.springframework.web.bind.annotation.*;
@RequestMapping("/api")
@RestController
public class DeleteController {
@DeleteMapping("/delete/{userId}")
public void delete(@PathVariable String userId, @RequestParam String account){
System.out.println(userId);
System.out.println(account);
}
}
PUT API (0) | 2022.08.17 |
---|---|
POST API (0) | 2022.08.16 |
Get API (0) | 2022.08.16 |
SpringBoot를 사용하여 "hello spring boot" 출력하기 (0) | 2022.08.16 |
스프링 부트 란? (0) | 2022.08.04 |