次のように、反応で axios を使用して GET リクエストを作成しました。
searchCity: function(){
return axios.get('https://autocomplete.wunderground.com/aq?query=lond' + '&format=JSON')
}
ただし、次のエラーが表示されます。
https://autocomplete.wunderground.com/aq?query=lond&format=JSON. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access.
これはパブリック API であり、アクセス キーなどは必要ありませんが。この URL から JSON データを取得する別の方法はありますか?