I am using angularjs to pass the data to back end(python flask)
var currenttopic = "All";
$http.post("/CA/"currenttopic,date).success(function(response){
console.log(response);
});
and in backend the python flask code is something like
@app.route('/CA/<topic>', methods=['POST'])
@login_required
def competitivepertopic(topic):
if request.method == 'POST':
print(topic)
data = request.get_json()
pass
return json.dumps({'data': topic})
now how can i pass currenttopic variable to backend?