I am trying to get Flask using a simple route with a path converter:
@api.route('/records/<hostname>/<metric>/<path:context>')
It works unless the "path" in the URL uses a leading slash. In this case, I get 404. I understand the error, but what I do not understand is that there is no workaround in the documentation or anywhere on the Internet how to fix this. I feel like I'm the first to try to do this basic thing.
Is there a way to make this work with a meaningful URL? For example, a query like this:
http://localhost:5000/api/records/localhost/disks.free//dev/disk0s2
source
share