In order to measure progress, I'm thinking about doing these two things while making axios call:
- get file size while making call to json file
- get percentage of file downloaded out of the file size from network tab
So far I just have this where I can get the data but I need some way to get the metadata behind it (the information in the network console like file size, amount downloaded so far)
const request = axios.get('/data');
request.then((response) => {
}
Or is there another way of measuring progress?