4 ms·
using object.format is perfectly ok regarding the rest. using headers might be more pure, but its not the biggest issue. the biggest issue with the rest-wanna-
by Vitaly 15y ago
using object.format is perfectly ok regarding the rest. using headers might be more pure, but its not the biggest issue.
the biggest issue with the rest-wanna-be interfaces is their use of object ids instead of object uris. so that I have to construct my own urls to access stuff.
in a proper restful api you are NEVER supposed to construct your own url. you are supposed to get all the relevant ones from the service.
and this kind of api is actually much more user friendly and allows for much better discovery. you just get the single top api url which has references for all the available collections objects and operations right there in the result.
- rkalla 15y agoVitaly, So something like: GET /image.json/pig.png?size=150x100 as opposed to GET /image.json?id=pig.png&size=150x100 where the arguments specific to the noun (or object/entity or image resource in this specific case) go in the query string, but the URL stem itself must be a valid resource reference?