객체를 그대로 복사하려는 요청은 GET이 맞나요? 아니면 POST가 맞나요?
조회수 479회
어떤 객체를 복사해서 기존 제목에 '복사본'이라고만 붙인 새로운 객체(DB에 저장되는)를 만들려고 합니다. 이런 request를 할 때는 get이 맞는지 post가 맞는지 햇갈려서요.
검색해보니 w3school에서는
GET is used to request data from a specified resource.
GET is one of the most common HTTP methods.
POST is used to send data to a server to create/update a resource.
POST is one of the most common HTTP methods.
PUT is used to send data to a server to create/update a resource.
라고 나오는데요. 햇갈리네요.
서버로 별도 data를 보내지 않으니 POST가 아닌것 같지만, Create a resource에 해당하니 POST같기도 해서요.
댓글 입력