Re:Tesla Model S JSON API
by zenocon on Sunday June 29, 2014 @10:58PM
(#7963480)
I (really do) hate posting this but I swear every single "REST" or "RESTful" or "REST-ful" API post I see, there's always that guy that chides it for not being pure or REST or "-ful" or something. Do we really care that much? Does the API work? If so, move on...
[ Parent
| on HN ]
If every Java program was called functional programming people would probably care as much. It works, so move on...
The main problem is that it's not just a small deviation from REST, but the absolute opposite of it. That's hard to ignore.
The main issue with the quoted example is that GET is intended for non-destructive interaction with no side-effects. Whether you use PUT or POST is a much smaller argument than whether to use GET or something else.
To most people, honking the car's horn is an unwanted side effect.
As has already been pointed out, some browsers will fetch-ahead to ensure that pages appear to load instantly. If you open a page which is a bunch of buttons which do stuff like honk the horn, lock the door, raise the window or open the charging port door, there will be unwanted side effects.
So yes, we do care that much.
If it doesn't follow the design pattern in some form that it states it does, then it should be referred to as the technological interface it's offered through - in this case a web service.
I would love an answer for this. How can we describe an api without just calling it a generic 'web service' - where that may be misinterpreted as being a SOAP web service. And it's not strictly a REST web service.
http://stackoverflow.com/questions/24482179/whats-the-best-a...