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

API: beforeSend does not cancel request #3660

Closed
vkruoso opened this issue Feb 6, 2016 · 5 comments
Closed

API: beforeSend does not cancel request #3660

vkruoso opened this issue Feb 6, 2016 · 5 comments
Milestone

Comments

@vkruoso
Copy link

vkruoso commented Feb 6, 2016

In the "Cancelling Requests" section of the API usage docs I can see that if false is returned from the beforeSend callback the request should be cancelled. This is not the case. The example itself does issue the request, as it is easily viewed in the console.

Is there any other way of cancelling the request?

@yaowenz
Copy link

yaowenz commented Feb 12, 2016

I've encouter the same issue. Seems $(this).state('flash text', 'Requires Login!'); will block sending, but i think it's not the right way. I think state management is still under developing.

@jlukic
Copy link
Member

jlukic commented Feb 13, 2016

Can you produce the minimal test case required to reproduce this.

@jlukic
Copy link
Member

jlukic commented Feb 13, 2016

I'm fairly certain this is a bug that was introduced in a recent patch.. No good.

@jlukic
Copy link
Member

jlukic commented Feb 15, 2016

This was probably introduced when API request was refactored into multiple functions. get settings was returning {} instead of false causing the beforeSend checks not to work.

@jlukic jlukic closed this as completed Feb 15, 2016
@vkruoso
Copy link
Author

vkruoso commented Feb 22, 2016

@jlukic Sorry about not updating the issue with more information. As I can see the problem is now fixed! Thanks a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants