Falcon v0.3.0.1 Documentationnormalizes incoming URI paths to simplify later processing and improve the predictability of application logic. In addition to stripping a trailing slashes, if any, Falcon will convert empty paths to “/”. Note Same as for HTTPError. 5.3.6 Middleware Components Middleware components provide a way to execute logic before the framework routes each request, after each request is routed but before the target responder pass def on_get(self, req, resp): pass Falcon middleware components can also be used to insert logic before and after requests. However, unlike hooks, middleware components are triggered globally for0 码力 | 77 页 | 311.34 KB | 1 年前3
Falcon v1.0.0 Documentationnormalizes incoming URI paths to simplify later processing and improve the predictability of application logic. In addition to stripping a trailing slashes, if any, Falcon will convert empty paths to “/”. Note entire resource like so: @falcon.before(extract_project_id) class Message(object): # ... Similar logic can be applied globally with middleware. (See falcon.middleware) 5.2. User Guide 29 Falcon Documentation header in the response. 5.3.7 Middleware Components Middleware components provide a way to execute logic before the framework routes each request, after each request is routed but before the target responder0 码力 | 87 页 | 348.15 KB | 1 年前3
Falcon v0.2.0 Documentationnormalizes incoming URI paths to simplify later processing and improve the predictability of application logic. In addition to stripping a trailing slashes, if any, Falcon will convert empty paths to “/”. Note Same as for HTTPError. 5.3.5 Middleware Components Middleware components provide a way to execute logic before the framework routes each request, after each request is routed but before the target responder pass def on_get(self, req, resp): pass Falcon middleware components can also be used to insert logic before and after requests. However, unlike hooks, middleware components are triggered globally for0 码力 | 70 页 | 296.15 KB | 1 年前3
Falcon v0.3.0.1 Documentationnormalizes incoming URI paths to simplify later processing and improve the predictability of application logic. In addition to stripping a trailing slashes, if any, Falcon will convert empty paths to “/”. Note » Classes and Functions » Middleware Components Middleware components provide a way to execute logic before the framework routes each request, after each request is routed but before the target responder def on_get(self, req, resp): pass Falcon middleware components can also be used to insert logic before and after requests. However, unlike hooks, middleware components are triggered globally for0 码力 | 126 页 | 345.09 KB | 1 年前3
Falcon v1.1.0 Documentationnormalizes incoming URI paths to simplify later processing and improve the predictability of application logic. In addition to stripping a trailing slashes, if any, Falcon will convert empty paths to “/”. Note entire resource like so: @falcon.before(extract_project_id) class Message(object): # ... Similar logic can be applied globally with middleware. (See falcon.middleware) To learn more about hooks, take Location header in the response. 6.3.7 Middleware Middleware components provide a way to execute logic before the framework routes each request, after each request is routed but before the target responder0 码力 | 113 页 | 426.53 KB | 1 年前3
Falcon v1.2.0 Documentationnormalizes incoming URI paths to simplify later processing and improve the predictability of application logic. In addition to stripping a trailing slashes, if any, Falcon will convert empty paths to “/”. Note start by factoring out the business logic from the resource’s POST responder in images.py so that it can be tested independently. In this case, the resource’s “business logic” is simply the image-saving operation: image_store = ImageStore('.') return create_app(image_store) As you can see, the bulk of the setup logic has been moved to create_app(), which can be used to obtain an API object either for testing or for0 码力 | 177 页 | 252.56 KB | 1 年前3
Falcon v1.2.0 Documentationnormalizes incoming URI paths to simplify later processing and improve the predictability of application logic. In addition to stripping a trailing slashes, if any, Falcon will convert empty paths to “/”. Note start by factoring out the business logic from the resource’s POST responder in images.py so that it can be tested independently. In this case, the resource’s “business logic” is simply the image-saving operation: 6.2. User Guide 35 Falcon Documentation, Release 1.2.0 As you can see, the bulk of the setup logic has been moved to create_app(), which can be used to obtain an API object either for testing or for0 码力 | 134 页 | 498.46 KB | 1 年前3
Falcon v1.3.0 Documentationdocumented and disabled by default. Finally, when it comes to the framework itself, we take care to keep logic paths simple and understandable. All this makes it easier to reason about the code and to debug edge start by factoring out the business logic from the resource’s POST responder in images.py so that it can be tested independently. In this case, the resource’s “business logic” is simply the image-saving operation: image_store = ImageStore('.') return create_app(image_store) As you can see, the bulk of the setup logic has been moved to create_app(), which can be used to obtain an API object either for testing or for0 码力 | 146 页 | 535.22 KB | 1 年前3
Falcon v1.3.0 Documentationwell-documented and disabled by default. Finally, when it comes to the framework itself, we take care to keep logic paths simple and understandable. All this makes it easier to reason about the code and to debug edge start by factoring out the business logic from the resource’s POST responder in images.py so that it can be tested independently. In this case, the resource’s “business logic” is simply the image-saving operation: image_store = ImageStore('.') return create_app(image_store) As you can see, the bulk of the setup logic has been moved to create_app(), which can be used to obtain an API object either for testing or for0 码力 | 194 页 | 266.90 KB | 1 年前3
Falcon v1.4.1 Documentationdocumented and disabled by default. Finally, when it comes to the framework itself, we take care to keep logic paths simple and understandable. All this makes it easier to reason about the code and to debug edge start by factoring out the business logic from the resource’s POST responder in images.py so that it can be tested independently. In this case, the resource’s “business logic” is simply the image-saving operation: image_store = ImageStore('.') return create_app(image_store) As you can see, the bulk of the setup logic has been moved to create_app(), which can be used to obtain an API object either for testing or for0 码力 | 158 页 | 587.88 KB | 1 年前3
共 40 条
- 1
- 2
- 3
- 4













