Skip to content Skip to sidebar Skip to footer

Catch-all Url In Flask-restful

There is a Catch-All URL ability in Flask from flask import Flask app = Flask(__name__) @app.route('/', defaults={'path': ''}) @app.route('/') def catch_all(path

Solution 1:

The comment posted by cricket_007 solved the problem:

If you are needing to accept anything with slashes, then api.add_resource(Endpoint, '/<path:content>') should work

Post a Comment for "Catch-all Url In Flask-restful"