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

Terminate a query, like in Axios #997

Closed
grosscorporation opened this issue Nov 12, 2019 · 1 comment · Fixed by #1003
Closed

Terminate a query, like in Axios #997

grosscorporation opened this issue Nov 12, 2019 · 1 comment · Fixed by #1003
Labels
type:feature New feature or improvement of existing feature

Comments

@grosscorporation
Copy link

I have a feature request, to terminate a pending query for example =

`class Example extends Component {
signal = axios.CancelToken.source();

componentWillUnmount() {
		this.signal.cancel('Api is being canceled');
}`
@dplewis
Copy link
Member

dplewis commented Nov 12, 2019

Canceling file saves was recently added. We could reuse that here. Would you like to open a PR?

@dplewis dplewis added enhancement type:feature New feature or improvement of existing feature labels Nov 14, 2019
dplewis added a commit that referenced this issue Nov 20, 2019
Closes: #997

Taken from Android API [cancel](http://parseplatform.org/Parse-SDK-Android/api/com/parse/ParseQuery.html#cancel--)

Can be improved in the future.
dplewis added a commit that referenced this issue Nov 23, 2019
* Support: query.cancel()

Closes: #997

Taken from Android API [cancel](http://parseplatform.org/Parse-SDK-Android/api/com/parse/ParseQuery.html#cancel--)

Can be improved in the future.

* fix tests

* Add xmlhttprequest note

* remove tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature New feature or improvement of existing feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants