[Zope] How do I mimic an HTTP post from a script

Bakhtiar A Hamid kdie@nstp.com.my
Wed, 12 Feb 2003 00:00:25 +0800 (MYT)


On Tue, 11 Feb 2003, Marc Burgauer wrote:

> Hi
> 
> I'm sure that this question has been answered before, but searching the
> archive for a couple of hours, I could not find it. Yes, I'm new to python.
> 
> I am using Zope 2.4 on Solaris.
> 
> I need to send the input from a HTML form to a remote server as an HTTP
> post, but I first need to validate the inputs  and convert them into an
> XML-formatted string. I want to do this in a python script. (I'm fine doing
> the XML formatting.)
> 
> The "remote" post is currently of a fire-and-forget nature, but in the
> future might be changed to contain a response (success/failure=>post again).
> 

KebasData is advertised to this stuff.  i haven't tested the POST method 
thouroughly tho
http://www.zope.org/Members/kedai/KebasData


or check out the code and put it in externalmethod

or check the howto by peterbe (iirc) about using urllib2
(google for urllib2 and zope)

or use Client.py that comes with zope

the choice is yours ;)


> 
> Cheers
> 
> Marc
> 
> PS: I'd be glad for recommendations of any good in depth "teaching" books on
> Python. I have the library references, but they are a bit brief for the
> un-initiated.
> 
> (a convert from PHP, where I knew how to do this)
> 
> 
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - 
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )
>