News for hackers. Stuff that matters.
Re:Eve: A Python REST API Framework by jessaustin on Tuesday September 10, 2013 @01:34PM (#6361539)
Does this corner case really justify dealing with another entire verb? Even if we stipulate that null has a specific meaning for our application that we don't want to screw up, how about empty object, array, or string? ( {}, [], or "" ) Do all of those mean something for, e.g., the "lastname" field?
Re:Eve: A Python REST API Framework by gruntmaster9000 on Tuesday September 10, 2013 @11:14PM (#6365297)
PUT is almost functionally identical to a PATCH, so it’s not exactly an entire other verb. It’s also a very standard verb. Using the example from a pull request on Eve ( https://github.com/nicolaiarocci/eve/issues/96 ), what if you want to indicate that the middle name is no longer known? Marking it as null means there isn’t one, not that it is unknown. Sure, for many applications the distinction doesn’t matter. But for plenty, it does. (I just recently had to fix an API’s implementation of PUT that actually was more like a PATCH but needed to be a proper PUT.) And it’s foolish for an API to require knowing a nonstandard way of expressing `undefined` when simply not defining something is the best way to not define it.

Eve looks nice, but they really need to justify not supporting PUT, beyond just “PATCH is usually better”.

Re:Eve: A Python REST API Framework by nicola on Wednesday September 11, 2013 @01:28AM (#6365687)
Hello, thanks for your feedback. PUT is coming to Eve with v0.1.0 (next release).
Re:Eve: A Python REST API Framework by nicola on Friday September 13, 2013 @08:07AM (#6379892)
In fact, it's on the dev branch already.
Re:Eve: A Python REST API Framework by johns on Tuesday September 10, 2013 @07:19PM (#6364277)
It's not the only reason. PUT is the only way to do retryable creates since it's idempotent. Leaving it out is a huge omission.