Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
We’ve seen how the four primary HTTP methods—GET, POST, PUT, and DELETE—define the basic operations that can be performed on a resource. And by setting the method attribute of the @RequestMapping annotation appropriately, we can cause DispatcherServlet to direct requests for those HTTP verbs to specific controller methods. Spring MVC can handle requests for any of the HTTP methods—assuming the client sends the requests in the form of the desired HTTP method.
The gotchas in that plan are HTML and the web browser. Non-browser clients, such as those that use RestTemplate, should have no trouble sending requests to perform any of the HTTP verbs. But HTML 4 only officially supports GET and POST in forms, leaving PUT, DELETE, and all other HTTP methods in the cold. Even though HTML 5 and newer browsers will support all of the HTTP methods, you probably can’t count on the users of your application to be using a modern browser.