# Axios API

axios에 해당 config을 전송하면 요청이 가능합니다.

# axios(config)
// POST 요청 전송
axios({
  method: 'post',
  url: '/user/12345',
  data: {
    firstName: 'Fred',
    lastName: 'Flintstone'
  }
});
// node.js에서 GET 요청으로 원격 이미지 가져오기
axios({
  method: 'get',
  url: 'http://bit.ly/2mTM3nY',
  responseType: 'stream'
})
  .then(function (response) {
    response.data.pipe(fs.createWriteStream('ada_lovelace.jpg'))
  });
# axios(url[, config])
// GET 요청 전송 (기본값)
axios('/user/12345');

# 요청 메소드 명령어

+

关注公众号,获取验证码 !

验证码:
Last Updated: 2/24/2023, 9:22:20 AM