Advertisement
Guest User

Untitled

a guest
Sep 19th, 2016
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. //Some angular code
  2. var body = {
  3. username: this.username,
  4. password: this.password,
  5. firstName: this.firstName,
  6. lastName: this.lastName,
  7. uid: this.uid,
  8. gradYear: this.gradYear,
  9. phoneNumber: this.phoneNumber,
  10. email: this.email,
  11. }
  12. console.log(body);
  13. $http({
  14. method: 'POST',
  15. url: '/api/register',
  16. headers: {'Content-Type': 'application/x-www-form-urlencoded'},
  17. data: JSON.stringify(body)
  18. }).then(...
  19.  
  20.  
  21. Server receives:
  22. req.body: {'{"username":"....' : ''}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement