¡@

Home 

2014/10/16 ¤W¤È 12:07:05

jquery Programming Glossary: request.data

Flask not getting any data from jQuery request data

http://stackoverflow.com/questions/11839855/flask-not-getting-any-data-from-jquery-request-data

from jQuery request data I've a handler for a URL @app.route methods 'POST' @crossdomain origin ' ' def hello ss str request.data print ss return ss The handler cannot retrive the data part of the request. When using jQuery jQuery.ajax type POST dataType.. nothing is returned jquery python flask share improve this question interesting as it turns out you can only use request.data if the data was posted with a mimetype that flask can't handle otherwise its an empty string I think the docs weren't very.. f return decorator @app.route methods 'POST' @crossdomain origin ' ' def hello ss str request.form print 'ss ' ss ' request.data ' str request.data return ss @app.route test def t return html head head body script src http code.jquery.com jquery.min.js..