I have a rest API that takes longer to populate complete result data (as it iterates the remove directory recursively which is time taking sometimes) during that time the client is keep waiting. once all the data is populated we are sending a response back to the client.
The problem with the above method is the client is keep waiting until all the data is populated.
is there a way in .net, the Rest API sends the data back to the client in chunks as the data keeps on populating? (without client to wait till whole data is generated).
Can you provide a sample of how to achieve the above requirement in .Net ?