r/programminghumor • • May 15 '26

HTTP methods

Post image
823 Upvotes

119 comments sorted by

View all comments

Show parent comment

1

u/Sacaldur May 15 '26

It could very well be that a resource requested eith a GET performs some data collection, and any GraphQL request will be sent with the POST method (no matter what it actuwlly does), but some other systems might rely on thr methods to make assumptions:

  • responses to get requests might be cached (by the browser, by a CDN, etc.) since they don't modify data
  • PUT and DELETE requests might be repeated implicitly by the framework since they are idempotent
  • HEAD and OPTION requests might be sent out liberally since they are only requesting meta information

Just because it's technically possible to delete resources on a GET request, doesn't mean you should do it.