Return to Snippet

Revision: 14199
at May 23, 2009 15:26 by atr000

Initial Code
import urllib,urllib2

url = ''
parameters = {'Mot' : 'Gimp'}

data = urllib.urlencode(parameters)    # Use urllib to encode the parameters
request = urllib2.Request(url, data)
response = urllib2.urlopen(request)    # This request is sent in HTTP POST
page =

Initial URL

Initial Description
I see almost all GET, so this is handy to have around

Initial Title
python: urllib2 http post

Initial Tags
http, post, python

Initial Language