1
Fala galera,
I’m still starting in React-On and I’m doing a test by connecting to a webservice:
consultar(){
var ret = '';
ret = axios.get('http://192.168.0.142:8080/rest/clientes?cpf=05092845406').then( response => { console.log(response); })
.catch( ()=> {console.log('Erro:');} );
console.log(ret);
this.setState = {
textoBusca: 'Pesquisou',
};
Alert.alert(
'Alert Title',
ret.status ,
[
{text: 'Ask me later', onPress: () => console.log('Ask me later pressed')},
{text: 'Cancel', onPress: () => console.log('Cancel Pressed'), style: 'cancel'},
{text: 'OK', onPress: () => console.log('OK Pressed')},
],
{ cancelable: false }
)
}
the date of this get is an array of 1 row and n columns.