Search Interview Questions | ![]() ![]() Click here and help us by providing the answer. ![]() Click Correct / Improve and please let us know. |
|
| ||||
Rest - Interview Questions and Answers for 'Put vs post' - 3 question(s) found - Order By Newest | ||||
![]() | ||||
| ||||
Ans. PUT requests are only meant to place the object as it is on server. For example - You want a file to be uploaded and then placed in a particular folder or you want an Employee object to be persisted in the table. POST requests are also meant to transfer information from client to server but that information once received at the server is evaluated , modified or refactored before persisting. | ||||
![]() | ||||
![]() ![]() ![]() ![]() ![]() | ||||
![]() | ||||
![]() | ||||
![]() | ||||
| ||||
Ans. It should be a POST Request | ||||
![]() | ||||
![]() ![]() ![]() ![]() | ||||
![]() | ||||
![]() | ||||
![]() | ||||
| ||||
Ans. It depends on whether the request object is persisted as it is or its first dismantled, modified or refactored and then inserted into DB. In first case, it should be a PUT request whereas in second case it should be a POST Request. | ||||
![]() | ||||
![]() ![]() ![]() ![]() ![]() ![]() | ||||
![]() | ||||
![]() | ||||
![]() | ||||