비동기 통신1 [axios] axios 비동기 통신 목차샘플 코드function callAPI(e) { e.preventDefault(); const url = 'api.test.com'; axios.post(url, { param: //데이터 있으면.. 넣기 }) // 정상인 경우 .then((response) => { if (response.data.success) { location.href = "/"; } }) // 예외 발생 .catch((error) => { console.error('데이터 처리 .. IT/development 2025. 1. 19. 이전 1 다음