Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- login=()=>{
- fetch('http://192.168.0.101:9090/Shakehands',{
- method:'post',
- headers:{
- 'Accept':'application/json',
- 'Content-type':'application/json',
- },
- body:JSON.stringify({
- email:this.email,
- password:this.password,
- text:"Login"
- })
- })
- .then((responseData)=>{
- return responseData.json();
- })
- .then((responseData)=>{
- //console.log(responseData);
- //alert(this.state.insdata)
- if(responseData.success=true){
- this.props.navigation.navigate('Home');
- }
- else{
- alert(responseData.message);
- }
- }).done();
- }
- if(rows.length>0){
- res.send({'success':true,'message':'Welcome'})
- }
- else{
- res.send(JSON.stringify({'success':false,'message':'User not found'}))
- }
- })
Add Comment
Please, Sign In to add comment