0

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

1 Answer 1

2

You get 200 OK because you're making a http GET request.

To authenticate yourself with the credentials make a http POST request.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.