-
-
Notifications
You must be signed in to change notification settings - Fork 10.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1.1.2 onDownloadProgress callback function parameter is not same as 0.27.2, lost target
field
#5063
Comments
I am running into the same issue. I was accessing |
I also ran into this issue. Was using the target for processing currently received data chunks on the browser/client side. Per https://stackoverflow.com/questions/58961981/axios-request-with-chunked-response-stream-from-node axios.post(
apiUrl,
{
ids: toGrab.map((r) => r.macAddress),
},
{
onDownloadProgress(event) {
parseReceived(event.currentTarget.response);
}
}
); Client makes a request for information from many devices. Server queries requested devices, retrieves per-device information, and chunk encodes reply as a multipart/form back to the client. Client then processes new information as it arrives. Workaround is to wait for the complete response to arrive before processing can start :( |
Similar issue I wanted to log progress only for |
Some issue. I'm using target to parse data that's comes in chunks of data (application/json+streamed), streamed by server as data chunks were available, making app more responsive instead of waiting for all data to be collected. With this method, the client can wait for all data to be collected, or show data to the user as it arrives. |
Hi 👋 Please try the latest pre-release by running the following: npm i axios@1.2.0-alpha.1 |
This change seems to break build on NodeJS ... Steps to reproduce:
It will show the following error: > npm run compile
> compile
> tsc
node_modules/axios/index.d.ts:275:11 - error TS2304: Cannot find name 'ProgressEvent'.
275 event?: ProgressEvent;
~~~~~~~~~~~~~
Found 1 error in node_modules/axios/index.d.ts:275 A bit of research did reveal that a similar bug was reported back in 2020: -- @jasonsaayman @DigitalBrainJS could you take a look into this? |
@IchordeDionysos I'll deal with this tomorrow. This seems to have happened more than once, people forget that Axios is cross-platform and add PRs with strict DOM-related types https://github.com/axios/axios/pull/4675/files. |
From version https://github.com/DigitalBrainJS/axios/blame/v0.20.0/index.d.ts#L62-L63 |
@DigitalBrainJS yes it's understandable |
@DigitalBrainJS, hey folks, any reason why this fix didn't get it into the recent 1.2.0 release? When can we expect otherwise? Thanks! |
Describe the bug
in
0.27.2
progress
isProgressEvent
in
1.1.2
progress
Expected behavior
1.1.2
same as0.27.2
Environment
The text was updated successfully, but these errors were encountered: