def getInfo(): s = requests.Session() s.auth = ('', 'lua') # Username is blank, just provide the password r = s.get('http://localhost:8080/requests/status.xml', verify=False) print r.text return r sXML = getInfo() print sXML.text