Guest User

Untitled

a guest
Mar 20th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. $.ajax({
  2. url: "http://127.0.0.1:5000/",
  3. method: "POST",
  4. headers: {
  5. 'Access-Control-Allow-Origin':'*',},
  6. data: dict,
  7. });
  8.  
  9. @app.route('/',methods=['POST'])
  10. def hello_world():
  11. ok = request.get_json()
  12. print(ok['id'])
  13. return '', 200
Add Comment
Please, Sign In to add comment