wegue-oss / wegue

Template and components for webmapping applications with OpenLayers and Vue.js
BSD 2-Clause "Simplified" License
93 stars 41 forks source link

Use axios consequently for all HTTP requests in Wegue #400

Open chrismayer opened 4 weeks ago

chrismayer commented 4 weeks ago

Since axios is added to Wegue as dependency we should consequently use axios to perform HTTP requests. So usage of other techniques like fetch, XMLHttpRequest, ... should be replaced by axios calls.

Herewith axios should be upgraded to its latest version.

This issue is based on this discussion.

sronveaux commented 5 hours ago

Hi @chrismayer, hi @fschmenger,

I was looking through upgrading the Geocoder component when I thought it was clearly linked with this one. It seems Geocoder is the last place where HTTP requests are not made through Axios...

Before working on it, I wanted to discuss here with both of you what should stay and could be removed... this component is "relatively" complicated because it either uses good old JSON-P or fetch depending on the configuration returned by the provider... Currently, none of the stock providers are making use of JSON-P anymore and this technique, as you certainlky know, even though it was necessary and very useful at a time is now more than deprecated, mainly because of its security concerns.

My real question was: do you really think we should keep the JSON-P possibility or could it be completely removed ? If you want to keep it, do you really know a safe geocoding server which still uses this technology to make some tests ?

Thanks in advance to give your opinion here to aim to the best solution with this issue.

Cheers