From da78a9e329e272dedb2400b79a3bdeebff387d47 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:42:17 -0500 Subject: initial commit --- files/ko/web/http/methods/put/index.html | 101 +++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 files/ko/web/http/methods/put/index.html (limited to 'files/ko/web/http/methods/put') diff --git a/files/ko/web/http/methods/put/index.html b/files/ko/web/http/methods/put/index.html new file mode 100644 index 0000000000..0f440eb174 --- /dev/null +++ b/files/ko/web/http/methods/put/index.html @@ -0,0 +1,101 @@ +--- +title: PUT +slug: Web/HTTP/Methods/PUT +tags: + - HTTP + - HTTP method + - Reference + - Request method +translation_of: Web/HTTP/Methods/PUT +--- +
{{HTTPSidebar}}
+ +

HTTP PUT 메서드는 요청 페이로드를 사용해 새로운 리소스를 생성하거나, 대상 리소스를 나타내는 데이터를 대체합니다.

+ +

PUT과 {{httpmethod("POST")}}의 차이는 {{glossary("idempotent", "멱등성")}}으로, PUT은 멱등성을 가집니다. PUT은 한 번을 보내도, 여러 번을 연속으로 보내도 같은 효과를 보입니다. 즉, 부수 효과가 없습니다.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
요청에 본문 존재
성공 응답에 본문 존재아니오
{{Glossary("Safe", "안전함")}}아니오
{{Glossary("Idempotent", "멱등성")}}
{{Glossary("Cacheable", "캐시 가능")}}아니오
HTML 양식에서 사용 가능아니오
+ +

구문

+ +
PUT /new.html HTTP/1.1
+
+ +

예제

+ +

요청

+ +
PUT /new.html HTTP/1.1
+Host: example.com
+Content-type: text/html
+Content-length: 16
+
+<p>New File</p>
+ +

응답

+ +

대상 리소스를 나타내는 데이터가 없고, PUT 요청이 성공적으로 하나를 새로 생성한 경우, 출처 서버는 반드시 {{glossary("user agent", "사용자 에이전트")}}에게 {{HTTPStatus("201")}} (Created) 응답을 보내 해당 사항을 알려줘야 합니다.

+ +
HTTP/1.1 201 Created
+Content-Location: /new.html
+ +

대상 리소스를 나타내는 데이터가 있고, 이를 요청에 포함된 자료에 준하여 성공적으로 수정했다면, 출처 서버는 반드시 {{httpstatus("200")}} (OK) 또는 {{httpstatus("204")}} (No Content) 응답을 보내 성공을 알려줘야 합니다.

+ +
HTTP/1.1 204 No Content
+Content-Location: /existing.html
+
+ +

명세

+ + + + + + + + + + + + +
명세제목
{{RFC("7231", "PUT", "4.3.4")}}Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content
+ +

브라우저 호환성

+ + + +

{{Compat("http.methods.PUT")}}

+ +

같이 보기

+ + -- cgit v1.2.3-54-g00ecf