VueJs Axios

Axios is a great http client library for making Ajax requests. It's also quite easy to use with Vue. It uses promises by default and runs on both the client and the server (which makes it appropriate for fetching data during server-side rendering). It provides a simple and rich API. You can combine it with async/await.

<!DOCTYPE html>
<html lang="en">
   <script type="text/javascript" src=""></script>
   <script type="text/javascript" src=""></script>
     <div id="axios">
	   <p v-if="this.users.length ==0">loading...</p>
		 <li v-for="user in users">{{ }}</li>
     new Vue ({
        	el: '#axios',
		data: {
		          users : [],
		          url : '',
	   created() {
		           var vm = this;
			   .then(function(response) {



  • {{ }}