vuejs automatic http request code example
Example 1: http requests in vue 3
# http requests using Fetcht api in Vue 3 explained (see videos below)
# https://www.youtube.com/watch?v=-Aoyja_BjZY
# https://www.youtube.com/watch?v=LvOYCjpMQ10
Example 2: import api vue and html
new Vue({
el: '#app',
data () {
return {
info: null
}
},
mounted () {
axios
.get('https://api.coindesk.com/v1/bpi/currentprice.json')
.then(response => (this.info = response))
}
})