|
How to execute a long/Big http request using post method of
|
Posted: Jun 10, 2009 2:58 AM
|
|
Advertisement
|
Hi All,
I am very new to python.
I have to execute some https requests using python scripts.
I am using the below code:
------------------------------------------------------------------ #!/us r/bin/python import urllib2,sys from google.appengine.api import urlfetch our_url = str(sys.argv[1]) username = str(sys.argv[2]) password = str(sys.argv[3]) passman = urllib2.HTTPPasswordMgrWithDefaultRealm() passman.add_password(None, our_url, username, password) authhandler = urllib2.HTTPBasicAuthHandler(passman) opener = urllib2.build_opener(authhandler) urllib2.install_opener(opener) try: file_handle = urlfetch.fetch(url=our_url,method=urlfetch.POST) except IOError, e: print 'ERROR_REASON:', e.reason else: print file_handle.read()
-----------------------------------------------
Its working fine with normal length http requests.
But in my requirement some https request are of about 1000, 10000 characters, and teh above code is not able to execute the same.
I have to use some post mechanism for the same.
Can anyone please help me regarding this.
Any help is highly appreciated.
Best Regards, Manish
|
|