Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //client
- regid = {'reg':e.regid};
- alert(regid['reg']);
- //sending the regId to the server
- $.ajax({
- type:'POST',
- url:'http://192.168.1.75:5000/api/v1.0/register_id',
- contentType:'application/json',
- data:JSON.stringify(regid),
- success: function(){
- alert('registration OK');
- }
- });
- //server
- @app.route('/api/v1.0/register_id', methods=['POST'])
- def registration():
- registration = request.get_json()
- print registration()
- return jsonify({})
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement