axios for web code example
Example 1: axios library
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
Example 2: axios
axios.post('/user', { firstName: 'Fred', lastName: 'Flintstone' })
.then( response => { })
.catch( error => { });