Created
September 1, 2019 19:49
-
-
Save comet0/2dd6fc0d08b4468db66b6e5f85af0c2b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import falcon | |
class TestResponse(): | |
def on_get(self, req, resp): | |
resp.body = "Success" | |
resp.content_type = falcon.MEDIA_TEXT | |
application = falcon.API() | |
# http://localhost/item/19/01/01/Item-190101-59559ee7-e661-43c8-9da1-0ab83b9e0d8e.json | |
application.add_route("/item/{y:int}/{m:int}/{d:int}/Item-{yymmdd:int}-{item_id:uuid}.json", TestResponse()) | |
application.add_route("/item2/{y:int(2)}/{m:int(2)}/{d:int(2)}/Item-{yymmdd:int(6)}-{item_id:uuid}.json", TestResponse()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for reporting!
Although this was "sort of known" for Falcon developers, I filed this as a new issue: falconry/falcon#1567
Even if we cannot afford fixing this soon, we should at least clearer document the current limitations.