axios example
HTML
<script src="https://unpkg.com/axios@0.16.2/dist/axios.js"></script>
JavaScript
var root = 'https://httpstat.us/400'
// Make a GET request
axios.get(root)
.then((data) => {
console.log('data', data)
})
.catch((e) => {
console.log('error', e)
})