Closed rrthomas closed 10 years ago
it’s not obvious to me how to implement them in REST This breaks compatibillity between the differenent adpters.
We could think of something like this for our REST. For example, we are returning a list of directory contents for a GET when the url ends with a slash, that's our own API, nothing HTTP describes.
Maybe we could just use a special "GET" that for example adds a custom header, like, "x-ufojs-io-stat" or so. Then we return a json(?) serialisation of the nodejs stat object. One question is, what happens if the stat object has too much information for some use cases (i.e. a ZIP adapter or a local storage adapter). We may want to describe what we expect from "our" stat data object. A lot of the information that stat returns is not available for other storing mechanisms or would mean more work for the implementor.
I'd rather worry about this case when we actually want it. Then, my first question would be, what does WebDAV do?
In order to achieve this, I performed some restructuring: