Выдает ошибку 400
import http.client
import urllib.parse
headers = {
"accept": "application/json",
"accept-encoding": "gzip, deflate, br",
"Connection": "keep-alive",
"content-type": "application/json",
"Host": "lds-api-sites.ligastavok.ru",
"Origin": "https://www.ligastavok.ru",
"Referer": "https://www.ligastavok.ru/",
"Sec-Fetch-Dest": "empty",
"User-Agent": "Chrome/97.0.4692.71 Safari/537.36",
}
params = urllib.parse.urlencode(
{"limit": 10, "ns": "live", "view": "sport", "widgetVideo": False, "exceptEventIds": []}
)
conn = http.client.HTTPConnection("lds-api-sites.ligastavok.ru",443)
conn.request("POST", "/rest/events/v6/actionLines", body=params, headers=headers)
response = conn.getresponse()
print(response.status, response.reason)
data = response.read()
print(data)
conn.close()