why flask code not giving dictionary values in web page

31 Views Asked by At

Why I am getting an empty dict in web page after running this code?

app = Flask(__name__)

@app.route('/multiplication')
def multi():
    data = request.form
    print('data is',data)
    return f'data is {data}'
if __name__ == '__main__':
    app.run()

When I pass values as a = 10, b= 5 through postman app, its showing correct dictionary in powershell but in the web page it's showing empty dict.

I tried above code to get the dictionary {'a' : '10' , 'b' : '5'} but instead getting {} empty dict in web page

0

There are 0 best solutions below