appdynamics

How do I use basic HTTP authentication with the python Requests library?

How do I use basic HTTP authentication with the python Requests library? Question: I’m trying to use basic HTTP authentication in python. I am using the Requests library: auth = requests.post(‘http://’ + hostname, auth=HTTPBasicAuth(user, password)) request = requests.get(‘http://’ + hostname + ‘/rest/applications’) Response form auth variable: <<class ‘requests.cookies.RequestsCookieJar’>[<Cookie JSESSIONID=cb10906c6219c07f887dff5312fb for appdynamics/controller>]> 200 CaseInsensitiveDict({‘content-encoding’: ‘gzip’, ‘x-powered-by’: …

Total answers: 6