Skip to content
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

XMLHttpRequest upload (upload.onprogress) event is not supported #573

Open
MeetinaXD opened this issue May 11, 2024 · 0 comments
Open

XMLHttpRequest upload (upload.onprogress) event is not supported #573

MeetinaXD opened this issue May 11, 2024 · 0 comments

Comments

@MeetinaXD
Copy link

Hi, I noticed that #292 mentioned that interceptor has added support for the upload event of XMLHttpRequest, but I tried to use XHR to upload files in the latest version of msw, and the progress event was not triggered.

By the way, #292 mentions adding support for the progress event, but this only works in response.

I'm wondering if it's possible to add support for the progress event in upload?


Environment

  • msw: 2.3.0
  • nodejs: 2.3.0
  • pnpm: 9.0.6

To Reproduce

const xhr = new XMLHttpRequest()

// codes...
xhr.upload.onprogress =({ loaded, total }) => {
    console.log(loaded, total) // not triggered
};

xhr.send(someFormData)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant