Falcon v3.0.0-b1 Documentationcontent_length = self._image_store.open(name) class ImageStore: _CHUNK_SIZE_BYTES = 4096 _IMAGE_NAME_PATTERN = re.compile( '[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\. [a-z]{2,4}$' def open(self, name): # Always validate untrusted input! if not self._IMAGE_NAME_PATTERN.match(name): raise IOError('File not found') image_path = os.path.join(self._storage_path middleware with Falcon? Instances of falcon.App are first-class WSGI apps, so you can use the standard pattern outlined in PEP-3333. In your main “app” file, you would simply wrap your api instance with a middleware0 码力 | 1028 页 | 725.86 KB | 1 年前3
Falcon v3.0.0 Documentationcontent_length = self._image_store.open(name) class ImageStore: _CHUNK_SIZE_BYTES = 4096 _IMAGE_NAME_PATTERN = re.compile( '[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\. [a-z]{2,4}$' def open(self, name): # Always validate untrusted input! if not self._IMAGE_NAME_PATTERN.match(name): raise IOError('File not found') image_path = os.path.join(self._storage_path middleware with Falcon? Instances of falcon.App are first-class WSGI apps, so you can use the standard pattern outlined in PEP-3333. In your main “app” file, you would simply wrap your api instance with a middleware0 码力 | 1055 页 | 739.30 KB | 1 年前3
Falcon v3.0.1 Documentationcontent_length = self._image_store.open(name) class ImageStore: _CHUNK_SIZE_BYTES = 4096 _IMAGE_NAME_PATTERN = re.compile( '[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\. [a-z]{2,4}$' def open(self, name): # Always validate untrusted input! if not self._IMAGE_NAME_PATTERN.match(name): raise IOError('File not found') image_path = os.path.join(self._storage_path middleware with Falcon? Instances of falcon.App are first-class WSGI apps, so you can use the standard pattern outlined in PEP-3333. In your main “app” file, you would simply wrap your api instance with a middleware0 码力 | 1058 页 | 741.59 KB | 1 年前3
Falcon v3.0.0-b2 Documentationcontent_length = self._image_store.open(name) class ImageStore: _CHUNK_SIZE_BYTES = 4096 _IMAGE_NAME_PATTERN = re.compile( '[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\. [a-z]{2,4}$' def open(self, name): # Always validate untrusted input! if not self._IMAGE_NAME_PATTERN.match(name): raise IOError('File not found') image_path = os.path.join(self._storage_path middleware with Falcon? Instances of falcon.App are first-class WSGI apps, so you can use the standard pattern outlined in PEP-3333. In your main “app” file, you would simply wrap your api instance with a middleware0 码力 | 1041 页 | 730.21 KB | 1 年前3
CmlPHP v2.x 开发手册
件,我们的所有路由都配置在这个文件里,下面介绍方法及规则 相应接口 pattern' , 'adminbase/System/Config/show'); //v2.7+建议这么写效率更高且支持应用多级子目录 Route::get('blog/bb/:aid\d', [ //应用名,支持多级子目录 'System/Config',//控制器,支持多级子目录 'show'//方法名 ]); //只针对post请求有效 Route::post('pattern' , 'adminbase/System/Config/update'); //v2.7+建议这么写效率更高且支持应用多级子目录 Route::post('blog/bb/:aid\d' //应用名,支持多级子目录 'System/Config',//控制器,支持多级子目录 'update'//方法名 ]); //只针对put请求有效 Route::put('pattern' , 'adminbase/System/Config/add'); //v2.7+建议这么写效率更高且支持应用多级子目录 Route::put('blog/bb/:aid\d', [0 码力 | 245 页 | 720.67 KB | 1 年前3
CmlPHP v2.x 开发手册
配置文件,我们的所有路由都 配置在这个文件里,下面介绍方法及规则 相应接口 pattern' , 'adminbase/System/Config/show'); //v2.7+建议这么写效率更高且支持应用多级子目录 Route::get('blog/bb/:aid\d', [ //应用名,支持多级子目录 'System/Config',//控制器,支持多级子目录 'show'//方法名 ]); //只针对post请求有效 Route::post('pattern' , 'adminbase/System/Config/update'); //v2.7+建议这么写效率更高且支持应用多级子目录 Route::post('blog/bb/:aid\d', [ //应用名,支持多级子目录 'System/Config',//控制器,支持多级子目录 'update'//方法名 ]); //只针对put请求有效 Route::put('pattern' , 'adminbase/System/Config/add'); //v2.7+建议这么写效率更高且支持应用多级子目录 Route::put('blog/bb/:aid\d', [0 码力 | 251 页 | 973.37 KB | 1 年前3
CmlPHP v2.x 开发手册
配置文件,我们的所有路由都配置在这个文 件里,下面介绍方法及规则 相应接口 pattern' , 'adminbase/System/Config/show'); //v2.7+建议这么写效率更高且支持应用多级子目录 Route::get('blog/bb/:aid\d', [ //应用名,支持多级子目录 'System/Config',//控制器,支持多级子目录 'show'//方法名 ]); //只针对post请求有效 Route::post('pattern' , 'adminbase/System/Config/update'); //v2.7+建议这么写效率更高且支持应用多级子目录 Route::post('blog/bb/:aid\d', 支持多级子目录 'System/Config',//控制器,支持多级子目录 31 'update'//方法名 ]); //只针对put请求有效 Route::put('pattern' , 'adminbase/System/Config/add'); //v2.7+建议这么写效率更高且支持应用多级子目录 Route::put('blog/bb/:aid\d', [0 码力 | 143 页 | 1.54 MB | 1 年前3
Falcon v1.0.0 Documentationmiddleware with Falcon? Instances of falcon.API are first-class WSGI apps, so you can use the standard pattern outlined in PEP-3333. In your main “app” file, you would simply wrap your api instance with a middleware falcon.routing.compile_uri_template(template)[source] Compile the given URI template string into a pattern matcher. This function can be used to construct custom routing engines that iterate through a list can now be specified when calling Request.get_param(). This provides an alternative to using the pattern: value = req.get_param(name) or default_value Friendly constants for status codes were added (e0 码力 | 249 页 | 406.22 KB | 1 年前3
Falcon v0.2.0 Documentationmiddleware with Falcon? Instances of falcon.API are first-class WSGI apps, so you can use the standard pattern outlined in PEP-3333. In your main “app” file, you would simply wrap your api instance with a middleware falcon.routing.compile_uri_template(template)[source] Compile the given URI template string into a pattern matcher. This function currently only recognizes Level 1 URI templates, and only for the path portion else: params = {} resource = None for pattern, sink in self._sinks: m = pattern.match(path) if m: params = m.groupdict()0 码力 | 188 页 | 358.44 KB | 1 年前3
Falcon v1.0.0 Documentationmiddleware with Falcon? Instances of falcon.API are first-class WSGI apps, so you can use the standard pattern outlined in PEP-3333. In your main “app” file, you would simply wrap your api instance with a middleware falcon.routing.compile_uri_template(template)[source] Compile the given URI template string into a pattern matcher. This function can be used to construct custom routing engines that iterate through a list can now be specified when calling Request.get_param(). This provides an alternative to using the pattern: value = req.get_param(name) or default_value Friendly constants for status codes were added (e0 码力 | 312 页 | 368.58 KB | 1 年前3
共 65 条
- 1
- 2
- 3
- 4
- 5
- 6
- 7













