[Zope] passing variables with POST method

Dieter Maurer dieter@handshake.de
Sat, 8 Feb 2003 12:03:33 +0100


Eugen Nedelcu wrote at 2003-2-5 10:05 +0200:
 > Does anyone knows if there's a method with ZOPE to pass variables 
 > through POST method, beside using forms?
 > 
 > Something like this:
 > 
 > REQUEST.RESPONSE.redirect('url',query) with the effect of the 
 > following code in usual python:
 > 
 > >>> import urllib
 > >>> params = urllib.urlencode({'spam': 1, 'eggs': 2, 'bacon': 0})
 > >>> f = urllib.urlopen("http://www.musi-cal.com/cgi-bin/query", params)
You can use "urllib" in External Methods.

You can learn how to make "urllib" available in Python Scripts
(--> Zope Book, security chapter).


Dieter