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'}))
  • what is the problem? Do you get error message? Always show full error message in question. – furas Jul 19 '22 at 14:59
  • `http.client` may need much more complex code (with much more lines) and this is why people prefer `requests` – furas Jul 19 '22 at 15:00
  • [How to create a HTTP proxy handler with Python 3 HTTP lib - Stack Overflow](https://stackoverflow.com/questions/23837102/how-to-create-a-http-proxy-handler-with-python-3-http-lib) – furas Jul 19 '22 at 15:01

0 Answers0