I have a rest api which streams data in chunks. Each chunk is a list of 100 records.
In javascipt I use fetch API and it receives one chunk at a time.
But I am not able to have same behaviour in python. I have following code:
response = requests.get(url, stream=True)
response.raise_for_status()
response_text = response.text
print(response_text)
I see that response_text contains multiple json lists, while I expect only one list at a time.
What mistake am I making here?
1