We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
get : axios.get('Api_url').then((res) => { console.log('list : ' + res); }) .catch((err) => { console.log(err); });
axios.get('Api_url').then((res) => { console.log('list : ' + res); }) .catch((err) => { console.log(err); });
post : axios.post('Api_url', { userName : '홍길동', age : 40 }).then((res) => { console.log('add person : ' + res); }) .catch((err) => { console.log(err); });
axios.post('Api_url', { userName : '홍길동', age : 40 }).then((res) => { console.log('add person : ' + res); }) .catch((err) => { console.log(err); });
delete : axios.delete('Api_url', { userName : 'carrtos' }).then((res) => { console.log('delete person : ' + res); }) .catch((err) => { console.log(err); });
axios.delete('Api_url', { userName : 'carrtos' }).then((res) => { console.log('delete person : ' + res); }) .catch((err) => { console.log(err); });
put : axios.put('Api_url', { userName : '홍길동', age : 45 }).then((res) => { console.log('update person : ' + res); }) .catch((err) => { console.log(err); });
axios.put('Api_url', { userName : '홍길동', age : 45 }).then((res) => { console.log('update person : ' + res); }) .catch((err) => { console.log(err); });
Axios는 데이터 전송방식별로 메소드를 지원하며, 저기에 주소쓰고 추가 설정만 입력하면 AJAX 통신이 가능하다.
ES6 Promise 형태로 then, catch 를 통해 통신 성공, 실패를 컨트롤한다.
비동기 통신이기 때문에 ES8 async/await도 지원된다.
이렇게도 사용가능 : await axios({ method : 'POST', url : 'Api_url', data : { userName : '홍길동', age : 45 } })
await axios({ method : 'POST', url : 'Api_url', data : { userName : '홍길동', age : 45 } })
The text was updated successfully, but these errors were encountered:
No branches or pull requests
AJAX
Axios
Axios 문법
get :
axios.get('Api_url').then((res) => { console.log('list : ' + res); }) .catch((err) => { console.log(err); });
post :
axios.post('Api_url', { userName : '홍길동', age : 40 }).then((res) => { console.log('add person : ' + res); }) .catch((err) => { console.log(err); });
delete :
axios.delete('Api_url', { userName : 'carrtos' }).then((res) => { console.log('delete person : ' + res); }) .catch((err) => { console.log(err); });
put :
axios.put('Api_url', { userName : '홍길동', age : 45 }).then((res) => { console.log('update person : ' + res); }) .catch((err) => { console.log(err); });
Axios는 데이터 전송방식별로 메소드를 지원하며, 저기에 주소쓰고 추가 설정만 입력하면 AJAX 통신이 가능하다.
ES6 Promise 형태로 then, catch 를 통해 통신 성공, 실패를 컨트롤한다.
비동기 통신이기 때문에 ES8 async/await도 지원된다.
이렇게도 사용가능 :
await axios({ method : 'POST', url : 'Api_url', data : { userName : '홍길동', age : 45 } })
The text was updated successfully, but these errors were encountered: