I use the POST method via the requests library to download an EXCEL file.
payload = json.dumps({
"data_ids": [
"124902201",
"124835548"
]
})
headers = {
'Accept': 'application/vnd.ms-excel',
'Content-Type': 'application/json',
}
response=requests.post(url, headers=headers, data=payload)
file_excel=pandas.read_excel(response.content)
When I tried the query on Postman, it returns me a response in Bytes form. So the idea I had was to read this file and convert it to Excel format and then load it into a dataframe. Is it possible.