[Zope] GET vs. POST
Dennis Allison
allison@sumeru.stanford.EDU
Fri, 9 May 2003 14:58:45 -0700 (PDT)
Sorry, Tom, sarcasm does not play well on the list and especially not when
it's taken out of context.
My original question was to find a way to eliminate the display of
information in the browser's address window. Typically this comes
from passing information with a URL either by having an actual hyperlink
or through using a redirect and passing parameter with it.
There are Javascript mechanisms which might work but they all require
signed scripts--something my environment can't support. One could wrap
everything in a unitary frame set and run full screen--possibly the right
solution eventually but not for the moment. I'm still pondering this
problem.
Jamie has suggested that redirection is a bad idea and that I'd be better
off using some other mechanism both for the transfer of control and to
pass variables. You are suggesting much the same: that an idiom that
explicitly constructs and passes a REQUEST object explicitly may be better
than using the URL parameter mechanism may be a better approach. I'll
try that out on a few use cases and see how it plays. We are currently
beginning to re-engineer and scale-up our system so now's a good time to
do so.
On Fri, 9 May 2003, Passin, Tom wrote:
> [Dennis Allison]
> >
> > How do you transfer information via post when using
> > REQUEST['RESPONSE'].redirect?
> >
> > How do you get Zope to use POST as its default rather than GET?
> >
>
> Hmm, methinks you do not have a clear idea of how these things work.
> The choice of POST vs GET is not up to Zope per se. It is up to the
> User Agent, which in practice means it is up to the design of the web
> page itself. There is no Zope "default".
>
> If you want to redirect to a new page and pass some information to the
> redirected page while you do so, you would give the information to the
> page template via (typically) REQUEST variables (which you can set
> during Zope processing) - or other Zope variables - so that the DTML or
> ZPT that builds the redirected page can include the data into the page.
> Sometimes the data ends up populating visible or hidden fields in a
> form, sometimes you decide to apply it in other ways. At this level,
> neither GET nor POST is involved, since it would happen before the page
> is built and sent back to the browser.
>
> If this is not helpful enough, then give us a few (simplified and clear)
> scenarios tha trouble you, and maybe we can help clarify and simplify.
>