How to perform post method with data, proxy and headers, using http client?

81 views Asked by At

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'}))
0

There are 0 answers