카테고리 없음

PUT과 PATCH

백위한 2024. 5. 13. 18:27

메드: 클라이언트가 요청한 목적과 결과로 기대하는 것을 나타냄.

 

PUT: 대상 리소스의 모든 현재 표현을 요청 컨텐츠로 바꿈.

 

대상 리소스의 상태를 요청 메시지 콘텐츠에 포함된 표현으로 정의된 상태로 생성하거나 대체하도록 요청.

 

PUT 메서드는 문서의 전체 교체만 허용.

 

PATCH는 기존 HTTP 리소스를 수정할 수 있음.

 

Entity가 상황에 따라 변할 수 있음.

 

 

PUT: 덮어씌움

PATCH: 교체 방법 기제

 

 

PATCH 문서의 크기가 PUT에서 사용되는 새 자원 데이터의 크기보다 큰 경우에는 PATCH 대신 PUT을 사용하는 것이 좋다.

 

https://www.inflearn.com/questions/1175426/%EC%88%98%EC%A0%95%EC%9D%B4%EB%9D%BC%EB%8A%94-%EC%9E%91%EC%97%85%EC%9D%84-%ED%95%A0-%EB%95%8C-put%EC%9D%84-%EB%8D%94-%EC%82%AC%EC%9A%A9%ED%95%98%EB%8A%94-%EC%9D%B4%EC%9C%A0%EA%B0%80-%EC%9E%88%EC%9D%84%EA%B9%8C%EC%9A%94

 

수정이라는 작업을 할 때 PUT을 더 사용하는 이유가 있을까요? - 인프런

HTTP 메서드에 처음 공부할 때 수정의 경우에는 PUT과 PATCH를 사용한다고 배웠는데요. PUT의 경우에는 통째로 갈아끼우는 방식의 갱신이고PATCH의 경우에는 부분 수정이 가능하다고 배웠습니다.이

www.inflearn.com

 

https://www.rfc-editor.org/rfc/inline-errata/rfc5789.html

 

rfc5789

 

www.rfc-editor.org

https://www.rfc-editor.org/rfc/rfc9110.html#name-put

 

RFC 9110: HTTP Semantics

The Hypertext Transfer Protocol (HTTP) is a stateless application-level protocol for distributed, collaborative, hypertext information systems. This document describes the overall architecture of HTTP, establishes common terminology, and defines aspects of

www.rfc-editor.org

https://www.rfc-editor.org/info/rfc5789

 

Information on RFC 5789 » RFC Editor

 

www.rfc-editor.org