python - Flask - Getting request parameters in Google App Engine? -
i'm running flask on app engine , i'm having trouble getting request parameters of issued request.
here's function being called:
@app.route('/some_model/new', methods = ['put']) def new_some_model(): prop1 = request.args.get('prop1') prop2 = request.args.get('prop2') import logging logging.error(prop1) logging.error(prop2)
and i'm running following command curl:
curl -x put -d "prop1=prop1&prop2=prop2" http://myapp.appspot.com/some_function/new
i've tried several variations, no success. curl command returns "500 server error" , in app-log see both prop1 , prop2 none
@ point of logging. server error came properties being required later on. problem request.args.get() returning nothing. suggestions on might doing wrong? thank much!
data sent post
or put
in request.form
, request.args
parsed query string data.
Comments
Post a Comment