[Web-SIG] Random thoughts

Bill Janssen janssen at parc.com
Thu Oct 30 22:46:21 EST 2003


>   * I oppose Simon Willison's practice of using the same variable
>     in the "GET" and "POST" part of a request, but I will defend to the
>     death his right to do so.  (But not in Quixote, where a narrower
>     definition of what is Right, Good, and Truthfull prevails.)

I don't get it.  Any particular request only has one method, not two:
"GET" and "POST".  Are you talking about for some reason
special-casing these two methods in the Request class?  I think it
makes more sense to do things generically:

   request.path		(e.g., '/foo/bar')
   request.method	(e.g., "GET")
   request.part		(e.g., "#bletch", perhaps without the #)
   request.headers
   request.parameters	(either the query parms, or the multipart/form-data values)

   request.response() => returns a Response object tied to this request

   response.error(code, message)	Sends back an error
   response.reply(htmltext)		Sends back a message
   response.open(ContentType="text/html", code=200) => file object to write to
	fp.write(...)
	fp.close()			Sends back the response
   response.redirect(URL)		Sends back redirect to the URL

Bill



More information about the Web-SIG mailing list