3👍
✅
For example using the nuxt axios module:
<button @click="myMethod"> click me </button>
methods:{
myMethod() {
this.$axios.get('some-api-url').then(response => {
console.log(response)
})
}
}
Source:stackexchange.com