forked from bubblemanss/Guelph2015
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpostServer.js
28 lines (28 loc) · 1.06 KB
/
postServer.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
//var url = "http://127.0.0.1:8080"
//
//function createUser(formData){
// //data you post should look lik {firstName:"Bob", lastName:"Smith", other:"..."}
// jQuery.post(url, formData, function(data){
// //I'll be returning success or fail message.
// //If status code is 200, it's success
// //If it's 404, it's fail
// });
//}
//
//function loginUser(loginData){
// //data you post should look lik {email:"Bob", password:"Smith"}
// jQuery.post(url, loginData, function(data){
// //I'll be returning the user data
// //If status code is 200, it returns valid data
// //If status code is 404, it couldn't find the user
// });
//}
//
//function editUser(user){
// //data you post should look lik {firstName:"Bob", lastName:"Smith", other:"..."}
// // or the ID I've given you, the ID I'm still debating if I should return or not
// jQuery.post(url, user, function(data){
// //I'll be returning the user data
// //This should always work since it's supposed to be used after they log in
// });
//}