Doubt how to recover data using react-native axes

1

Talk to people,

To start still in react-native and I'm doing a test 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.

    
asked by anonymous 19.12.2017 / 20:49

0 answers