[twill] Making a POST request without a form

Titus Brown titus at caltech.edu
Tue Jul 3 06:29:28 PDT 2007


On Tue, Jul 03, 2007 at 12:53:42PM +0800, Ryan van Roode wrote:
-> Hello, and sorry if I've already sent this. Is there a way to send a
-> POST request through twill without using an actual form? I'm trying to
-> mimic some requests from a flash app. If there isn't, does anyone know
-> another way to do this? I'd like to be able to navigate a site, change
-> some things, send these POST requests, then navigate some more, all
-> within the same session. Thanks very much. Twill is a great tool.

Hi, Ryan,

you should be able to do this with urllib2; see

	http://www.voidspace.org.uk/python/articles/urllib2.shtml

(search for POST).

mechanize can do this as well.  I don't have an API for it in twill,
though.

cheers,
--titus



More information about the twill mailing list