I'm trying to access a website which requires username and password
code snippet
...
import urllib3
http = urllib3.PoolManager()
url = 'http://192.168.1.1'
headers = urllib3.make_headers(basic_auth='root:admin')
r = http.request('GET', url, headers=headers)
...
I get response 200 OK , even if I pass wrong credentials
please advice
You get 200 OK because you're making a http GET request.
To authenticate yourself with the credentials make a http POST request.
Basic Authentication does not work with urllib3