0
headers = {
    'Authorization': 'Bearer '+jtw,
}
conn = http.client.HTTPSConnection("api.minecraftservices.com")
conn.request("PUT", "/minecraft/profile/name/"+user, headers=headers)
response = conn.getresponse()
status_code = response.status
resp = response.read().decode("utf-8")

^ My code Because http.client is not used much, I couldn't really find an answer on google. How would I add a proxy to this?

TKirishima
  • 742
  • 6
  • 18
  • It is not used much because you are not supposed to use it directly. I recommend using `requests` and here is how you do it: https://stackoverflow.com/questions/8287628/proxies-with-python-requests-module – Bijay Regmi Apr 20 '22 at 08:29
  • Oh well, I'm using it of the speed, could I use sockets with proxies? or pycurl? Requests is really too slow – Max Merwijk Apr 20 '22 at 08:35
  • Well if you really must you can use something like the example here, https://docs.python.org/3/library/http.client.html#http.client.HTTPConnection.set_tunnel – Bijay Regmi Apr 20 '22 at 09:05

0 Answers0