반응형 post1 [React Native] 리액트 네이티브 비동기 서버 통신 axios 사용법 리액트 네이티브에서 비동기로 서버와 통신하는 방법중에 axios에 대해 알아보자. 비동기 서버 통신 API인 axios는 아래와 같은 형식으로 사용할 수 있다. import axios from 'axios'; axios.post('localhost:8080/api/login', { ID: "id", PASSWORD: "password" }) .then(result=>{ if(result){ Alert.alert('', '로그인 되었습니다.', [{text: '확인'}]); } }) .catch(function(error){ console.log('login catch error : '+JSON.stringify(error)); }) post 방식으로 localhost:8080/api/login 서버에 아.. 2023. 8. 23. 이전 1 다음 반응형