Should HTTP Verbs Be Used Semantically?

Posted by Xophmeister on Programmers See other posts from Programmers or by Xophmeister
Published on 2012-10-19T14:00:44Z Indexed on 2012/10/19 23:20 UTC
Read the original article Hit count: 222

If I'm making a web application which integrates with a server-side backend, would it be considered best practice to use HTTP methods semantically? That is, for example, if I'm fetching data (e.g., to populate a menu, etc.), I would use GET, but to update data (e.g., save a record), I would use POST. (I realise there are other methods that may be even more appropriate, but we need to consider browser support.)

I can see the benefits of this in the sense that it's effectively a RESTful API, but at a slightly increased development cost. In my previous projects, I've POST'd everything: Is it worth switching to a RESTful mindset simply for the sake of best practice?

© Programmers or respective owner

Related posts about programming-practices

Related posts about rest