More than 3000 questions in repository. There are more than 900 unanswered questions. Click here and help us by providing the answer. Have a video suggestion. Click Correct / Improve and please let us know.
Ans. REST or Representational State Transfer is a flexible architecture style for creating web services that recommends the following guidelines -
1. http for client server communication,
2. XML / JSON as formatiing language ,
3. Simple URI as address for the services and,
4. stateless communication.
Help us improve. Please let us know the company, where you were asked this question :
Ans. GET is supposed to get information from the server. Client sends the minimal information so that Server can respond with the response body on basis of request. For example - You want to get complete employment record for employee id 123
POST is supposed to send the information for submission. Payload or a Body is usually sent so that it can be persisted on the server. For example - Sending the complete information of an employee ( id, name , dept etc ) to the server for persisting it.
Help us improve. Please let us know the company, where you were asked this question :
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.
Help us improve. Please let us know the company, where you were asked this question :