📜  axios get 方法 - 任何代码示例

📅  最后修改于: 2022-03-11 14:56:01.247000             🧑  作者: Mango

代码示例6
const axios = require('axios');

// Make a request for a user with a given ID
axios.get('/user?ID=12345')
  .then(function (response) {
    // handle success
    console.log(response);
  })
  .catch(function (error) {
    // handle error
    console.log(error);
  })
  .then(function () {
    // always executed
  });