I have written the following python script, using python requests (http://requests.readthedocs.org/en/latest/):
import requests payload = {\'key1\': \'value 1\
this seems to be a known bug/issue in python :
http://bugs.python.org/issue13866
I think you will have to go around this issue using urllib and urllib2 and avoid requests. look at the bug reports for some tips on how to do that.
urllib
urllib2