News for hackers. Stuff that matters.
Re:LoopBack, a new Node.js framework by StrongLoop by Rezo on Sunday May 25, 2014 @11:38AM (#7796565)
Nitpick, but the "GET /people/{id}/exists" in the example to check if the instance exists is a bit weird, would suggest "HEAD /people/{id}" for this type of operation.
Re:LoopBack, a new Node.js framework by StrongLoop by Goopplesoft on Sunday May 25, 2014 @02:10PM (#7797007)
Actually the resource should typically 404 to indicate it doesn't exists (generally speaking for http apis).
Re:LoopBack, a new Node.js framework by StrongLoop by euank on Sunday May 25, 2014 @02:49PM (#7797130)
Yeah, the HEAD or GET should return a 404 on not existence; however, the HEAD also won't return data which is the point. GET implies that you have need of the returned data (presumably all the properties of that person). GET is for "it exists AND I want to know about it". HEAD really is more appropriate here.
Re:LoopBack, a new Node.js framework by StrongLoop by enjoyjava on Sunday May 25, 2014 @04:06PM (#7797389)
HEAD is a good fit. We'll add support for that. Please open github issues to help us track the feature requests or bug fixes at https://github.com/strongloop/loopback/issues.
Re:LoopBack, a new Node.js framework by StrongLoop by s_kilk on Sunday May 25, 2014 @02:23PM (#7797041)
Yeah, this is a bit weird. For some reason I'm still surprised when I see pseudo-REST being passed off as RESTful.
Re:LoopBack, a new Node.js framework by StrongLoop by nailer on Monday May 26, 2014 @01:13AM (#7798785)
They have a resource called 'push' too. I don't know what a 'push' is.