created() {
var that=this
axios.
get(
‘http://jsonplaceholder.typicode.com/todos‘)
.
then(
function (
res) {
then(
function (
res) {
// handle success
// console.log(res);
that.
todos =
res.
data
})
.
catch(
function (
error) {
catch(
function (
error) {
// handle error
console.
log(
error);
})
.
finally(
function () {
finally(
function () {
// always executed
});
},
}