💡Aha!

RESTful API 디자인

메소드

  • Create — POST
  • Read/Retrieve — GET
  • Update — PUT / PATCH
    • PUT — update or create, 리소스 대상이 존재하지 않으면 생성함.
    • PATCH — update only, 리소스 대상이 존재하지 않으면 오류
  • Delete — DELETE

refs

RESTful API Design - PUT vs PATCH
When designing API endpoints, there's always the need to specify what http method to use for CRUD (Create, Read/Retrieve, Update, Delete) operations. Commonly, this is nailed down as: Given the mapping above, I won't be surprised if you think PUT and PATCH do the same thing and are simply aliases but you couldn't be further from the truth.
RESTful API Design - PUT vs PATCH
https://blog.segunolalive.com/posts/restful-api-design-%E2%80%94-put-vs-patch/
RESTful API Design - PUT vs PATCH
2024 Dohyun Jung.
Made with ☕️.