Python: How to debug HTTP while using urllib2

… import urllib import urllib2 #this is just to prepare a dynamic uri (this is actual code from a system I’m building, sorry) fileDownloadServiceURL = ‘%s://%s:%s/%s’ % (transport,server,port,pathToController) postData = {‘URI’:fileUri} #add more post stuff here postData = urllib.urlencode(postData) #make sure you encode your post data #add some custom headers if you need them headers={“Host”: […]