2 # -*- coding: iso-8859-1 -*-
4 # $Id: test_post3.py,v 1.1 2004/06/21 11:24:18 kjetilja Exp $
7 POSTSTRING = urllib.urlencode({'field1':'value1', 'field2':'value2 with blanks', 'field3':'value3'})
14 def read_cb(self, size):
15 assert len(POSTSTRING) <= size
20 # Nothing more to read
26 c.setopt(c.URL, 'http://pycurl.sourceforge.net/tests/testpostvars.php')
28 c.setopt(c.POSTFIELDSIZE, len(POSTSTRING))
29 c.setopt(c.READFUNCTION, t.read_cb)
30 c.setopt(c.VERBOSE, 1)