Python bottle accept data send by jquery -


i'm using python bottle, html/css, , javascript develop website. in javascript part, want send list data end python using jquery:

$.ajax({             type: "post",             url: '/deleteauthor',             data: keys,             success: function() {             (var i=0, n=checkboxes.length; i<n; ++i)                 if (checkboxes[i].checked==true) {                     var id = "#" + checkboxes[i].value;                     $(id).hide();                 }             }         }); 

in python bottle side, how can receive the data?

something like:

from bottle import route, run, request @route('/deleteauthor', method='post') def index():     request.body.seek(0)     data = request.body.read()     #do data  run(host='localhost', port=8080, debug=true) 

Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -