Advertisement
Guest User

Untitled

a guest
Nov 9th, 2019
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class RegisterPayload {
  2.     constructor(username, password) {
  3.         this.username = username;
  4.         this.password = password;
  5.     }
  6.  
  7.     send(callback) {
  8.         const httpr = new XMLHttpRequest();
  9.         const url = VELOREN_AP + "/api/v1/register";
  10.         httpr.open("POST", url);
  11.         httpr.send(JSON.stringify(this));
  12.         httpr.onreadystatechange((e) => callback(httpr));
  13.     }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement