REST Questions

Mark Baker
Sun, 26 Aug 2001 02:29:48 -0400 (EDT)

> # With xmlStorageSystem, you have the getMyDirectory() method that returns
> an
> # XML document.  Why doesn't that document have an URL that I can do a GET
> on?
> For the same reason that WebDAV uses PROPFIND instead of GET for similar
> operations? That there are too many parameters and options that control
> what "that document" actually contains?

Not in this case.  The method is described here;

The only arguments are email address, and password (the authentication

> There was a nice design principle that was held to in DAV, that the
> server controls the URL space, and the client doesn't make up funny URLs.
> And that servers shouldn't be forced to assign URLs for things
> unnecessarily.

That's just good practice, no?  Nothing DAV specific there.

> Maybe it would be nice if a server *did* have a URL for the return
> value of a SOAP request for it to supply a Content-Location that could
> be used by subsequent GET requests?

Right.  I'm a proponent of a similar HTTP idiom when the complexity of
the input is too nasty to cast into an URL (I use POST, a 201 response,
and the Location response header).  I described that in a recent thread.
Using it over SOAP, even for RPC, seems a good thing to do if you've
already decided to do RPC.

Did WebDAV consider using that idiom instead of creating a new method?

I'm really looking forward to Jim's response to my first email.  There's
something oddly compelling about the concept of effectively annotating a
resource with lock, since that fits so well with documented POST semantics
(whether or not you agree with them).