0

I find analogue of:

response = requests.post(url, data=data, verify=False, proxies=Proxy, headers=header_gen())

using http.client lib

conn = http.client.HTTPConnection(url.netloc)
conn.request("POST", url.path, urllib.parse.urlencode({'username': 'admin', 'password': '123'}))
3
  • what is the problem? Do you get error message? Always show full error message in question. Commented Jul 19, 2022 at 14:59
  • http.client may need much more complex code (with much more lines) and this is why people prefer requests Commented Jul 19, 2022 at 15:00
  • How to create a HTTP proxy handler with Python 3 HTTP lib - Stack Overflow Commented Jul 19, 2022 at 15:01

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.