Guest User

Untitled

a guest
Aug 18th, 2018
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  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. }
Add Comment
Please, Sign In to add comment