Problem solve Get help with specific problems with your technologies, process and projects.

Does WebDAV violate the principles of REST?

Some say that WebDAV methods violate the principles of REST. What's your take on the issue?
The common criticism of WebDAV's methods, is that PROPFIND shouldn't be there, and instead GET should have been used. The argument goes - and rightly so, in my opinion - that given a URI, there should be a single method that asks for the information associated with that URI (or more accurately, asks for a representation of the state of the identified resource), as this is key to enabling the "shared information space" concept that is the Web.

REST is what is defined in Roy Fielding's dissertation, nothing more, nothing less. But if you look closely, you won't find anything which talks about using a single method as I just described. I've talked to Roy about this specific issue, and he responded that he didn't include it because he felt it was too obvious to mention (paraphrasing). I disagree with him on this; the fact that WebDAV WG members opted for PROPFIND when GET could have been used demonstrates, I believe, that it's sufficiently non-obvious, and presenting that guidance in his dissertation would have been valuable.

So the answer, technically, at least until Roy decides to publish a new definition of REST, is "No"; WebDAV's methods *are* RESTful, because they are uniform (i.e. all methods are meaningful on all resources), and that's the only constraint REST places on interface semantics. But, it's still important to keep in mind that this is an important part of Web architecture, even if Roy opted not to mention it.

Dig Deeper on Topics Archive

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.