Advertisement
Guest User

Untitled

a guest
Jul 6th, 2015
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. //client
  2. regid = {'reg':e.regid};
  3. alert(regid['reg']);
  4. //sending the regId to the server
  5. $.ajax({
  6. type:'POST',
  7. url:'http://192.168.1.75:5000/api/v1.0/register_id',
  8. contentType:'application/json',
  9. data:JSON.stringify(regid),
  10. success: function(){
  11. alert('registration OK');
  12. }
  13. });
  14.  
  15. //server
  16.  
  17. @app.route('/api/v1.0/register_id', methods=['POST'])
  18. def registration():
  19. registration = request.get_json()
  20. print registration()
  21. return jsonify({})
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement