Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Some angular code
- var body = {
- username: this.username,
- password: this.password,
- firstName: this.firstName,
- lastName: this.lastName,
- uid: this.uid,
- gradYear: this.gradYear,
- phoneNumber: this.phoneNumber,
- email: this.email,
- }
- console.log(body);
- $http({
- method: 'POST',
- url: '/api/register',
- headers: {'Content-Type': 'application/x-www-form-urlencoded'},
- data: JSON.stringify(body)
- }).then(...
- Server receives:
- req.body: {'{"username":"....' : ''}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement