I'm thinking this isn't exactly possible, but maybe I'm wrong. I'm simply torn between those who believe that only POST requests should modify data on the server and people that relax the rule and allow GET requests to modify data.
Take this situation. Say you have a table, each row is a row in the database. I'd like to allow them to delete the row via a fancy "X" icon as the very last <td></td>
element in the row. AFAIK, the only way to send a POST to the server is via a form. But do I really stuff an entire form into the last <td></td>
element just to do a POST? Or should I cheat and use an <a href=...></a>
tag that sends a GET request?
You may be thinking "Do both! Send a POST AND use the <a ...></a>
tag! Use fancy javascript + xhr!" And I'll say, oh? And how will that degrade in a zero javascript environment?
Maybe we've reached a point when it doesn't make sense to worry about gracefully degrading? I'm not sure. You tell me? I'm new to web development, but I understand most of the concepts involved.