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

Geocoder refactoring using axios and AbortController objects. Fixes #400 #416

Merged
merged 4 commits into from
Sep 24, 2024

Conversation

sronveaux
Copy link
Collaborator

This PR is a refactoring of the Geocoder using axios and AbortController to... abort requests when user asks for something else.

Globally, it makes the component more reactive. Before, if you typed an address while a request was running, the new address would not get searched. It should now be correctly debounced.

This PR also removes JSONP which was not used anymore.

It fixes #400 as axios will then be used in all requests made inside Wegue.

Eventually, unit tests are refactored too to use axios-mock-adapter on one side and to use sinon timers on the other.
Looks like sinon timers are now working well from my side, but please give it a try to ensure it works as expected on other configurations too...

Copy link
Collaborator

@chrismayer chrismayer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this. Tested it and it works like charm. Please merge at will...

@sronveaux sronveaux merged commit 7564b80 into wegue-oss:master Sep 24, 2024
1 check passed
@sronveaux sronveaux deleted the geocoder-with-axios branch September 24, 2024 07:48
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.

Use axios consequently for all HTTP requests in Wegue
2 participants