0

Flask URL interpreter recognizes /api/hello but not when passed like this /api/hello/

Is there to have it work both ways?

1

2 Answers 2

0

You can do like this @app.route("/api/hello/") In this way both url will work

Sign up to request clarification or add additional context in comments.

Comments

0

Add a / after hello so it will redirect to /api/hello/ even if request is done on /api/hello

@app.route('/app/hello/')

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.