Hello everyone,

I am having a problem with urllib2, when I do this :

   post = urllib.urlencode(post)
   request = urllib2.Request(url, post)
   response = urllib2.urlopen(request)

or this :

   post = urllib.urlencode(post)
   response = urllib2.urlopen(url, post)

or this :

   post = urllib.urlencode(post)
   request = urllib2.Request(url)
   response = urllib2.urlopen(request, post)

it doesn't work, it's like if the post params weren't added, and if I do this :

   post = urllib.urlencode(post)
   request = url + '?' + post
   response = urllib2.urlopen(request)

it works as expected, can anyone explain what is going on? I know that if I don't add the data ('post' in my case) param it uses an HTTP GET, could that be why it works when I add them manually?

Thank you,
Gabriel
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to