Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Vue.js | Making API calls using Axios
<!DOCTYPE html>
<html lang="en" xmlns:v-bind="">
<meta charset="UTF-8">
<title>Vue.js | Making API calls using Axios</title>
<body style="text-align: center">
<div id="app" style="display: inline-block;margin-top: 100px">
<img v-bind:src="avatar" alt="">
<h1 style="margin-bottom: 0">{{name}}</h1>
<script src=""></script>
<script src=""></script>
const data = {avatar: "", name: "john doe", email: ""};
var vm = new Vue({
el: '#app',
data: data,
mounted() {
.then(function (response) {
const user =[0];
vm.avatar = user.picture.large; = + " " +; =;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment