Answer the question
In order to leave comments, you need to log in
Response via flask?
Hello, is it possible to execute such code at all?
@app.route('/multiplicators',methods = ['GET'])
def get_multiplicator():
tiker = request.args.get('tiker')
country = request.args.get('country')
names = request .args.get('names')
return jsonify(parse_multiplicators(tiker,country,names))
I'm trying to pass parameters to my function in the query string so that it will work and give me a json response, but I get a missing 3 required positional error arguments: 'tiker', 'country', and 'names'
Answer the question
In order to leave comments, you need to log in
http://localhost:5000/multiplicators/1/hello/3
@app.route('/multiplicators/<names>/<tiker>/<country>', methods = ['GET'])
def get_multiplicator(names, tiker, country):
return jsonify(names, tiker, country)
#return jsonify(parse_multiplicators(tiker,country,names))
[
"1",
"hello",
"3"
]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question