SHARE
TWEET

Untitled

a guest Aug 18th, 2018 93 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. submitData(event) {
  2.     fetch("http://localhost:53248/api/home/saveData", {
  3.         method: 'POST',
  4.         headers: {
  5.             'Accept': 'application/json',
  6.             'Content-Type': 'application/json'
  7.         },
  8.         body: JSON.stringify({
  9.             // userName: this.state.userName,
  10.             // password: this.state.password,
  11.             email: this.state.email
  12.         })
  13.     }).then((Response) => Response.json())
  14.         .then((findresponse) => {
  15.             if (findresponse.result == 'authenticated')
  16.                 alert("1");
  17.             else
  18.                 alert("2");
  19.     })
  20. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top