axios: added axios.get inst

This commit is contained in:
Begerad, Stefan 2021-09-10 14:31:38 -04:00 committed by Begerad, Stefan
parent c6ce232147
commit 524b8f9df2
1 changed files with 15 additions and 1 deletions

View File

@ -1,8 +1,22 @@
import React from 'react';
import './style/main.less';
import axios from 'axios';
function axiosGet () {
console.log('axiosGet() this: ', this);
console.log('axiosGet() started...');
//send HTTP GET via axios
axios
.get('https://dedriver.org/xpress')
.then((response) => {
if (response.data) {
console.log('axiosGet() response.data: ', response.data);
}
})
.catch(function (error) {
console.log(error);
});
console.log('axiosGet() done.');
}
/*