what is a put request code example
Example 1: how does put request work
GET - retrieve resource
POST - create new resource
PUT - update existing resource
DELETE - delete resource
Example 2: post vs put
Post -
to create new object on the server
Put -
to update object in server with new value
Example 3: PUT vs POST
"PUT" puts a file or resource at a particular URI and exactly at that
URI. If there is already a file or resource at that URI, PUT changes
that file or resource. If there is no resource or file there, PUT makes
one.
POST sends data to a particular URI and expects the resource at
that URI to deal with the request. The web server at this point
can decide what to do with the data in the context of specified
resource.