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

Update axios to 1.x #1377

Merged
merged 6 commits into from
Jan 11, 2023
Merged

Update axios to 1.x #1377

merged 6 commits into from
Jan 11, 2023

Conversation

reinink
Copy link
Member

@reinink reinink commented Jan 11, 2023

This PR updates axios to 1.x.

As part of this update we've replaced the internal cancelToken handling with the new AbortController handling available in the newer versions of axios, as cancel tokens have been deprecated. However, the external API (onCancelToken() visit callback) has not changed for backwards compatibility reasons.

Also included with this update is a fancy new router.cancel() method that lets you easily cancel the currently active visit, effectively removing the need to ever use the onCancelToken() visit callback again.

import { router } from '@inertiajs/vue3'

router.cancel()

@reinink reinink merged commit 9d42cac into master Jan 11, 2023
@reinink reinink deleted the axios-1.x branch January 11, 2023 04:50
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

Successfully merging this pull request may close these issues.

1 participant