[Web-SIG] Random thoughts
Thijs van der Vossen
t.vandervossen at fngtps.com
Mon Nov 3 03:19:31 EST 2003
On Monday 03 November 2003 01:05, Steve Holden wrote:
> > > * 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:
> >
> > ...
>
> The question is how to integrate data from a POST request (i.e. from the
> standard input of the PORT transaction) and any parameters that may be
> included in the for action's URI (e.g. if the form has an action
> attribute such as "form.py?extra1=val1&extra2=val2")
Before asking _how_ we might first want to decide if we _should_. What's wrong
with having both a 'parameters' (query params) and a 'form-data' (posted form
data) dictionary as attributes of the request object?
In your code you could merge these two with a single line of code:
merged = request.parameters.update(request.form-data)
Where the posted form data will overwrite the query parameters with the same
name. You can also do this the other way round ofcourse.
Regards,
Thijs
--
Fingertips __ www.fngtps.com __ +31.(0)20.4896540
More information about the Web-SIG
mailing list