Interested in thoughts here: we're considering rolling out a new REST API, and curious about your preferred way of interacting with REST APIs: in particular, HTTP verbs (mostly interested in POST vs PUT vs PATCH). I’m familiar with the descriptions for the verbs but curious if you have preferences for when to use these or which to throw away. For example<p>- I’ve noticed Stripe only has POST operations, even for idempotent actions; no PUT or PATCH. I've never understood why except either for consistency purposes on some "legacy" API they built or because there's a good reason for never using these that I've never considered<p>- Elasticsearch/OpenSearch have POST and PUT on some operations and on occasion it indicates idempotency, but some POST operations are actually idempotent while some need to use PUT. I'm familiar that Elasticsearch implemented GET with HTTP bodies but that's not historically well supported by Javascript, so POST actions were added even for some of those GET actions<p>- I’ve heard some developers argue that having PUT and POST makes it more difficult to use because now you need to know the verb for each API and others argue on the flip side that it makes it easier because REST semantics follow for those that are familiar<p>- PATCH operations are relatively new, and I've heard they aren't always well supported by e.g. some corporate firewalls<p>Do you prefer the unique "right" verbs or do you find it easier to assume POST is for all "creation"/"update" actions?
I use GET, POST and DELETE. Generally that, plus the URL, is enough extra context to figure out what the expected operation should be. PUT/PATCH semantics are neat but I can’t say I find them particularly necessary.