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

[Feature request] add loadstart event #1859

Closed
jimblue opened this issue Oct 29, 2018 · 8 comments
Closed

[Feature request] add loadstart event #1859

jimblue opened this issue Oct 29, 2018 · 8 comments
Projects

Comments

@jimblue
Copy link

jimblue commented Oct 29, 2018

It could be nice to add XMLHttpRequest loadstart event inside Axios.

There is actually no event callback when the request start that could be use to display a loading spinner.

Thanks

@Orlandster
Copy link

Agreed. I think often you really don't need this, since you will trigger those kind of things (spinners etc.) on the event which triggers the request. But I can see use cases where you really want to trigger it on the loadstart.

As you already mentioned a callback on the data object would do the job. Something like this:

{
  onLoadStart: function() {
    // load started
  },
}

Are you going to implement this? Otherwise I would probably find a some time by the end of this week to do so.

@jimblue
Copy link
Author

jimblue commented Oct 30, 2018

Hey @Orlandster,

I'm not the best with js so it's probably better if you start the PR.
But I would be happy to help you by giving some feedbacks and making tests!

Cheers

@Orlandster
Copy link

@jimblue Sounds good. I'll keep you updated.

@skyFi
Copy link

skyFi commented Feb 25, 2019

Waiting for this...

2 similar comments
@flycj
Copy link

flycj commented Aug 23, 2019

Waiting for this...

@takhello
Copy link

Waiting for this...

@badeggg
Copy link

badeggg commented Jun 23, 2021

Waiting for this...

@jasonsaayman
Copy link
Member

See #4209

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
v1.0.0
  
To do
Development

No branches or pull requests

8 participants