You want to copy an object and create a new object (which is stored in the DB) that you have only labeled 'copy' in the existing title. When I make a request like this, I'm confused whether it's get or post.
I searched 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.
That's what it says. That's a split
I don't think it's POST because I don't send data to the server, but it's also like POST because it corresponds to Create a resource.
http restful
If it's me, I'll go with POST
. PUT
and PATCH
are modifications to existing data, and POST
is the generation of data that did not exist. It's because the creation method is copying and pasting, but it's true that it's a creation process. POST
seems to be correct.
And as far as I know... In principle, the GET
operation only requires SELECT
data, and does not do INSERT
or UPDATE
.
© 2024 OneMinuteCode. All rights reserved.