import http.client
conn = http.client.HTTPSConnection("randstuff.ru")
payload = ''
headers = {
'X-Requested-With': 'XMLHttpRequest'
}
conn.request("POST", "/joke/generate/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))