Guest User

Untitled

a guest
Apr 2nd, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. async function try_login(username, password)
  2. {
  3.     var new_headers = new Headers();
  4.  
  5.     new_headers.append('Content-Type', 'application/x-www-form-urlencoded');
  6.     username = encodeURIComponent(username);
  7.     password = encodeURIComponent(password);
  8.  
  9.     return fetch('', {method: 'POST', headers: new_headers, body:`login_email=${username}&login_pass=${password}&login=Login`})
  10.     .then(x => x.text());
  11. }
Add Comment
Please, Sign In to add comment