Falcon v1.0.0 Documentationmeaning (among # other things) that you think in terms of resources and state # transitions, which map to HTTP verbs. class ThingsResource(object): def on_get(self, req, resp): """Handles GET designed to be as intuitive as possible for anyone who understands the basics of HTTP. In Falcon, you map incoming requests to things called “Resources”. A Resource is just a regular Python class that includes exception falcon.HTTPNotFound(**kwargs)[source] 404 Not Found. Use this when the URL path does not map to an existing resource, or you do not wish to disclose exactly why a request was refused. exception0 码力 | 249 页 | 406.22 KB | 1 年前3
Falcon v1.0.0 Documentationmeaning (among # other things) that you think in terms of resources and state # transitions, which map to HTTP verbs. class ThingsResource(object): def on_get(self, req, resp): """Handles GET designed to be as intuitive as possible for anyone who understands the basics of HTTP. In Falcon, you map incoming requests to things called “Resources”. A Resource is just a regular Python class that includes method_map, resource): """Adds a route between URI path template and resource. Args: uri_template (str): The URI template to add. method_map (dict): A method map obtained0 码力 | 312 页 | 368.58 KB | 1 年前3
Falcon v3.0.0 Documentationmeaning (among # other things) that you think in terms of resources and state # transitions, which map to HTTP verbs. class ThingsResource: def on_get(self, req, resp): """Handles GET requests""" meaning (among # other things) that you think in terms of resources and state # transitions, which map to HTTP verbs. class ThingsResource: async def on_get(self, req, resp): """Handles GET requests""" two classes instead of one may lead to a cleaner design. (See also: What is the recommended way to map related routes to resource classes?) Note In this example, we serve the image by simply assigning0 码力 | 1055 页 | 739.30 KB | 1 年前3
Falcon v3.0.1 Documentationmeaning (among # other things) that you think in terms of resources and state # transitions, which map to HTTP verbs. class ThingsResource: def on_get(self, req, resp): """Handles GET requests""" meaning (among # other things) that you think in terms of resources and state # transitions, which map to HTTP verbs. class ThingsResource: async def on_get(self, req, resp): """Handles GET requests""" two classes instead of one may lead to a cleaner design. (See also: What is the recommended way to map related routes to resource classes?) Note In this example, we serve the image by simply assigning0 码力 | 1058 页 | 741.59 KB | 1 年前3
Falcon v3.0.0-b2 Documentationmeaning (among # other things) that you think in terms of resources and state # transitions, which map to HTTP verbs. class ThingsResource: def on_get(self, req, resp): """Handles GET requests""" meaning (among # other things) that you think in terms of resources and state # transitions, which map to HTTP verbs. class ThingsResource: async def on_get(self, req, resp): """Handles GET requests""" two classes instead of one may lead to a cleaner design. (See also: What is the recommended way to map related routes to resource classes?) Note In this example, we serve the image by simply assigning0 码力 | 1041 页 | 730.21 KB | 1 年前3
Falcon v3.0.0-b1 Documentationmeaning (among # other things) that you think in terms of resources and state # transitions, which map to HTTP verbs. class ThingsResource: def on_get(self, req, resp): """Handles GET requests""" meaning (among # other things) that you think in terms of resources and state # transitions, which map to HTTP verbs. class ThingsResource: async def on_get(self, req, resp): """Handles GET requests""" classes to strictly represent one RESTful resource per class. See also: What is the recommended way to map related routes to resource classes? Note Here, we serve the image by simply assigning an open aiofiles0 码力 | 1028 页 | 725.86 KB | 1 年前3
Falcon v0.2.0 Documentationmeaning (among # other things) that you think in terms of resources and state # transitions, which map to HTTP verbs. class ThingsResource: def on_get(self, req, resp): """Handles GET requests""" designed to be as intuitive as possible for anyone who understands the basics of HTTP. In Falcon, you map incoming requests to things called “Resources”. A Resource is just a regular Python class that includes exception falcon.HTTPNotFound(**kwargs)[source] 404 Not Found. Use this when the URL path does not map to an existing resource, or you do not wish to disclose exactly why a request was refused. exception0 码力 | 188 页 | 358.44 KB | 1 年前3
Falcon v0.3.0.1 Documentationmeaning (among # other things) that you think in terms of resources and state # transitions, which map to HTTP verbs. class ThingsResource: def on_get(self, req, resp): """Handles GET requests""" designed to be as intuitive as possible for anyone who understands the basics of HTTP. In Falcon, you map incoming requests to things called “Resources”. A Resource is just a regular Python class that includes HTTPError. exception falcon.HTTPNotFound(**kwargs) 404 Not Found. Use this when the URL path does not map to an existing resource, or you do not wish to disclose exactly why a request was refused. exception0 码力 | 126 页 | 345.09 KB | 1 年前3
Falcon v2.0.0 Documentationmeaning (among # other things) that you think in terms of resources and state # transitions, which map to HTTP verbs. class ThingsResource(object): def on_get(self, req, resp): """Handles GET requests""" I implement both POSTing and GETing items for the same resource? – What is the recommended way to map related routes to resource classes? • Extensibility – How do I use WSGI middleware with Falcon? module (see also this section of the tutorial.) Alternatively, you can use suffixed responders to map both routes to the same resource class: class MyResource(object): def on_get(self, req, resp, id):0 码力 | 184 页 | 671.87 KB | 1 年前3
Falcon v3.0.0 Documentationmeaning (among # other things) that you think in terms of resources and state # transitions, which map to HTTP verbs. class ThingsResource: (continues on next page) 5.1. User Guide 15 Falcon Documentation meaning (among # other things) that you think in terms of resources and state # transitions, which map to HTTP verbs. class ThingsResource: async def on_get(self, req, resp): """Handles GET requests""" two classes instead of one may lead to a cleaner design. (See also: What is the recommended way to map related routes to resource classes?) Note: In this example, we serve the image by simply assigning0 码力 | 344 页 | 1.16 MB | 1 年前3
共 40 条
- 1
- 2
- 3
- 4













