GET and POST

Brian Victor bhv1 at psu.edu
Thu Sep 11 11:56:28 EDT 2003


franck wrote:
> i know how to do a GET.
>:) i have this example.
> my contact tell my i must do a get AND a post :/
>
> GET to fuse param et POST for the others.

Without knowing urllib, I would infer from the rest of the code that
you'd want to do something like this:

getparams['fuseaction'] = '*****'
postparams['num_card']  = '*****'

getparams = urllib.urlencode(getparams)
postparams = urllib.urlencode(postparams)  # may not be necessary
f = urllib.urlopen("http://bidule.com?%s" % getparams, postparams)

-- 
Brian




More information about the Python-list mailing list