I noticed that we have some inconsistent usage of POST vs PUT (only 1
endpoint uses PUT today), so I did a little survey of our endpoints:

https://docs.google.com/document/d/1yo-ZcKAdrCwBmTDkAKGNLnhK7fAfwatKddZrhtpgyMk/edit?usp=sharing

A couple of findings:

* We often don't look at the method, so most GET endpoints will work the
same when sent a POST, PUT, etc. Presumably, we can fix this without
breaking users.
* Most writes are done with POST, regardless of whether the writes are
idempotent.
* Only /master/weights uses PUT (no POST) for its idempotent writes.

After discussing with Anand and Vinod, we felt it would be easiest for
users if all writes are done with POST. As part of this we would update
/master/weights to use POST to make it consistent. Let me know if there's
any feedback on this!

Ben

Reply via email to