Falcon v0.2.0 Documentation
Python ecosytem offers a bunch of great libraries that you are welcome to use from within your responder, hooks, and middleware. Falcon doesn’t try to dictate what you should use, since that would take also this section of the tutorial. How can I pass data from a hook to a responder, and between hooks? You can inject extra responder kwargs from a hook by adding them to the params dict passed into the hook for the most part, do the right thing. In other words, Falcon doesn’t try very hard to protect responder code from itself. This approach reduces the number of (often) extraneous checks that Falcon would0 码力 | 188 页 | 358.44 KB | 1 年前3Falcon v1.0.0 Documentation
also this section of the tutorial. How can I pass data from a hook to a responder, and between hooks? You can inject extra responder kwargs from a hook by adding them to the params dict passed into the hook for the most part, do the right thing. In other words, Falcon doesn’t try very hard to protect responder code from itself. This approach reduces the number of (often) extraneous checks that Falcon would high code coverage. 3. Errors are anticipated, detected, and handled appropriately within each responder and with the aid of custom error handlers. Tip Falcon will re-raise errors that do not inherit0 码力 | 249 页 | 406.22 KB | 1 年前3Falcon v1.0.0 Documentation
also this section of the tutorial. How can I pass data from a hook to a responder, and between hooks? You can inject extra responder kwargs from a hook by adding them to the params dict passed into the hook for the most part, do the right thing. In other words, Falcon doesn’t try very hard to protect responder code from itself. This approach reduces the number of (often) extraneous checks that Falcon would high code coverage. 3. Errors are anticipated, detected, and handled appropriately within each responder and with the aid of custom error handlers. Tip Falcon will re-raise errors that do not inherit0 码力 | 312 页 | 368.58 KB | 1 年前3Falcon v3.0.0 Documentation
StorageEngine() things = ThingsResource(db) app.add_route('/{user_id}/things', things) # If a responder ever raises an instance of StorageError, pass control to # the given handler. app.add_error_handler(StorageError RequireJSON.process_request → JSONTranslator.process_request ├── Process route responder ↢ JSONTranslator.process_response • Sinks: ⇥ /search/(?Pddg|y)\Z SinkAdapter StorageEngine() things = ThingsResource(db) app.add_route('/{user_id}/things', things) # If a responder ever raises an instance of StorageError, pass control to # the given handler. app.add_error_handler(StorageError 0 码力 | 1055 页 | 739.30 KB | 1 年前3Falcon v3.0.1 Documentation
StorageEngine() things = ThingsResource(db) app.add_route('/{user_id}/things', things) # If a responder ever raises an instance of StorageError, pass control to # the given handler. app.add_error_handler(StorageError RequireJSON.process_request → JSONTranslator.process_request ├── Process route responder ↢ JSONTranslator.process_response • Sinks: ⇥ /search/(?Pddg|y)\Z SinkAdapter StorageEngine() things = ThingsResource(db) app.add_route('/{user_id}/things', things) # If a responder ever raises an instance of StorageError, pass control to # the given handler. app.add_error_handler(StorageError 0 码力 | 1058 页 | 741.59 KB | 1 年前3Falcon v3.0.0-b2 Documentation
StorageEngine() things = ThingsResource(db) app.add_route('/{user_id}/things', things) # If a responder ever raises an instance of StorageError, pass control to # the given handler. app.add_error_handler(StorageError RequireJSON.process_request → JSONTranslator.process_request ├── Process route responder ↢ JSONTranslator.process_response • Sinks: ⇥ /search/(?Pddg|y)\Z SinkAdapter StorageEngine() things = ThingsResource(db) app.add_route('/{user_id}/things', things) # If a responder ever raises an instance of StorageError, pass control to # the given handler. app.add_error_handler(StorageError 0 码力 | 1041 页 | 730.21 KB | 1 年前3Falcon v3.0.0-b1 Documentation
StorageEngine() things = ThingsResource(db) app.add_route('/{user_id}/things', things) # If a responder ever raises an instance of StorageError, pass control to # the given handler. app.add_error_handler(StorageError RequireJSON.process_request → JSONTranslator.process_request ├── Process route responder ↢ JSONTranslator.process_response • Sinks: ⇥ /search/(?Pddg|y)\Z SinkAdapter StorageEngine() things = ThingsResource(db) app.add_route('/{user_id}/things', things) # If a responder ever raises an instance of StorageError, pass control to # the given handler. app.add_error_handler(StorageError 0 码力 | 1028 页 | 725.86 KB | 1 年前3Falcon v1.0.0 Documentation
also this section of the tutorial. How can I pass data from a hook to a responder, and between hooks? You can inject extra responder kwargs from a hook by adding them to the params dict passed into the hook for the most part, do the right thing. In other words, Falcon doesn’t try very hard to protect responder code from itself. This approach reduces the number of (often) extraneous checks that Falcon would high code coverage. 3. Errors are anticipated, detected, and handled appropriately within each responder and with the aid of custom error handlers. Tip: Falcon will re-raise errors that do not inherit0 码力 | 87 页 | 348.15 KB | 1 年前3Falcon v3.0.0-b2 Documentation
StorageEngine() things = ThingsResource(db) app.add_route('/{user_id}/things', things) # If a responder ever raises an instance of StorageError, pass control to # the given handler. app.add_error_handler(StorageError AuthMiddleware.process_request → RequireJSON.process_request → JSONTranslator.process_request Process route responder JSONTranslator.process_response • Sinks: /search/(?Pddg|y)\Z SinkAdapter • Error handlers: StorageEngine() things = ThingsResource(db) app.add_route('/{user_id}/things', things) # If a responder ever raises an instance of StorageError, pass control to # the given handler. app.add_error_handler(StorageError 0 码力 | 340 页 | 1.15 MB | 1 年前3Falcon v3.0.0 Documentation
StorageEngine() things = ThingsResource(db) app.add_route('/{user_id}/things', things) # If a responder ever raises an instance of StorageError, pass control to # the given handler. app.add_error_handler(StorageError AuthMiddleware.process_request → RequireJSON.process_request → JSONTranslator.process_request Process route responder JSONTranslator.process_response • Sinks: /search/(?Pddg|y)\Z SinkAdapter • Error handlers: StorageEngine() things = ThingsResource(db) app.add_route('/{user_id}/things', things) # If a responder ever raises an instance of StorageError, pass control to # the given handler. app.add_error_handler(StorageError 0 码力 | 344 页 | 1.16 MB | 1 年前3
共 40 条
- 1
- 2
- 3
- 4