Closed macfire closed 6 years ago
You need to listens request
event, not response
, because response
firing after downloading completed.
Your server should set Content-Length
header for working lengthComputable
, loaded
and total
XHR properties.
Thanks. I'll find out how to set Content-Length
header and try again.
I did discover that the Content-Length
is already being set. I tried putting the code in api.on('request')
, but the onprogress
method is not available.
I am going to close this thread for now. If I find a solution, I'll comment here.
Is it possible to get the progress of a (large) JSON response?
xhr spec xhr example
Update: I've tried implementing the example on whatwg.org, but no success. I don't see any calls to
onprogress
in my browser console. Would this be something provided by the server? (I'm using Python/Flask, and doing some research there also).