[Zope3-dev] Other (than GET and POST) HTTP Methods
Jim Fulton
jim@zope.com
Tue, 07 Jan 2003 14:41:45 -0500
One of these days, we need to implement:
- PUT
- WebDAV (which adds a bunch of additional HTTP methods)
I've been pondering how to approach this. In particular, I've been
wondering how people should provide implementations of these methods.
The alternatives I can think of are:
- Implement HTTP Views that have methods for each of the HTTP methods
other than GET and POST. I think that this is too course grained,
as views would need to implement every method someone might want to
use.
- Treat each method (or some grouping of methods) as a view type.
For example, we've treated the pair of methods, GET and POST as
the "Browser" view type. The problem is that I'm not sure there
are good groupings. For example, WebDAV uses GET and PUT, as well as
several WebDAV-specific methods.
- Treat each HTTP method as a separate HTTP view, such that the method
name and the view name are the same. For example, to handle a PUT
request, we'd look up the HTTP view named "PUT".
The third option seems to provide the best balence of flexability and
simplicity.
Thoughts?
Jim
--
Jim Fulton mailto:jim@zope.com Python Powered!
CTO (888) 344-4332 http://www.python.org
Zope Corporation http://www.zope.com http://www.zope.org