WeRoBot 0.2.0 微信公众号开发框架文档echo(message): return 'Hello World!' robot.run() ## Handlers WeRoBot会将合法的请求发送给handlers依次执行。 如果某一个Handler返回了非空值,WeRoBot就会根据这个值创建回复,后面的handlers将不会被执行。 你可以通过两种方式添加handler import werobot robot = werobot0 码力 | 8 页 | 32.83 KB | 2 年前3
WeRoBot 0.5.2 微信公众号开发框架文档https://github.com/whtsky/WeRoBot/issues 提 Issue 或者给我发邮件:whtsky [at] gmail.com · 入门 Hello World • Handlers 类型过滤 robot.key click 修饰符 ## 消息 公共属性 ☐ TextMessage ○ ImageMessage ☐ LinkMessage LocationMessage Copyright 2014, whtsky. Created using Sphinx 1.2.1. ## Handlers WeRoBot会将合法的请求发送给 handlers 依次执行。 如果某一个 Handler 返回了非空值,WeRoBot 就会根据这个值创建回复,后面的 handlers 将不会被执行。 你可以通过两种方式添加 handler import werobot robot 0.4.0 • Add session support • Add logging support • Rename werobot.test to werobot.testing • Handlers added by @robot.handler will have the lowest priority. #### V ersion 0.3.5 • Bug fix: Make BaseRoBot0 码力 | 30 页 | 59.42 KB | 2 年前3
THE NETWORKINGTS FROM SCRATCH: IO Objects(Restinio takes this approach) Completion handlers owning a state (perhaps including one or more I/O objects) is a useful pattern Service objects own completion handlers thereby breaking the potential ownership are owned by an ExecutionContext ExecutionContext destroys all services (and therefore completion handlers) as its lifetime ends struct my_service : std::net::execution_context::service { using key_type std::net::io_context::run will not return until lifetime of all such Executor objects ends Completion handlers invoked via Executor obtained through associated_executor customization point Completion handler0 码力 | 35 页 | 900.82 KB | 1 年前3
Falcon v3.1.1-b3 Documentationpage) JSONTranslator.process_response • Sinks: /search/(?Pddg|y)\Z SinkAdapter • Error handlers: StorageError handle (continued from previous page) Note that this example requires the httpx are designed to set the response headers and body appropriately for each error type. Tip: Error handlers may be registered for any type, including HTTPError. This feature provides a central location for application startup and shutdown. Let's implement the process_startup() and process_shutdown() handlers in our middleware to execute code upon our application's startup and shutdown, respectively: 0 码力 | 378 页 | 1.29 MB | 2 年前3
Falcon v3.1.1-a Documentationpage) JSONTranslator.process_response • Sinks: /search/(?Pddg|y)\Z SinkAdapter • Error handlers: StorageError handle (continued from previous page) Note that this example requires the httpx are designed to set the response headers and body appropriately for each error type. Tip: Error handlers may be registered for any type, including HTTPError. This feature provides a central location for application startup and shutdown. Let's implement the process_startup() and process_shutdown() handlers in our middleware to execute code upon our application's startup and shutdown, respectively: 0 码力 | 378 页 | 1.29 MB | 2 年前3
Falcon v3.1.1-b1 Documentationpage) JSONTranslator.process_response • Sinks: /search/(?Pddg|y)\Z SinkAdapter • Error handlers: StorageError handle (continued from previous page) Note that this example requires the httpx are designed to set the response headers and body appropriately for each error type. Tip: Error handlers may be registered for any type, including HTTPError. This feature provides a central location for application startup and shutdown. Let's implement the process_startup() and process_shutdown() handlers in our middleware to execute code upon our application's startup and shutdown, respectively: 0 码力 | 378 页 | 1.29 MB | 2 年前3
Falcon v3.1.1 Documentationpage) JSONTranslator.process_response • Sinks: /search/(?Pddg|y)\Z SinkAdapter • Error handlers: StorageError handle (continued from previous page) Note that this example requires the httpx are designed to set the response headers and body appropriately for each error type. Tip: Error handlers may be registered for any type, including HTTPError. This feature provides a central location for application startup and shutdown. Let's implement the process_startup() and process_shutdown() handlers in our middleware to execute code upon our application's startup and shutdown, respectively: 0 码力 | 378 页 | 1.29 MB | 2 年前3
Falcon v3.1.1-rc1 Documentationpage) JSONTranslator.process_response • Sinks: /search/(?Pddg|y)\Z SinkAdapter • Error handlers: StorageError handle (continued from previous page) Note that this example requires the httpx are designed to set the response headers and body appropriately for each error type. Tip: Error handlers may be registered for any type, including HTTPError. This feature provides a central location for application startup and shutdown. Let's implement the process_startup() and process_shutdown() handlers in our middleware to execute code upon our application's startup and shutdown, respectively: 0 码力 | 378 页 | 1.29 MB | 2 年前3
Falcon v3.1.0 Documentationpage) JSONTranslator.process_response • Sinks: /search/(?Pddg|y)\Z SinkAdapter • Error handlers: StorageError handle (continued from previous page) Note that this example requires the httpx are designed to set the response headers and body appropriately for each error type. Tip: Error handlers may be registered for any type, including HTTPError. This feature provides a central location for application startup and shutdown. Let's implement the process_startup() and process_shutdown() handlers in our middleware to execute code upon our application's startup and shutdown, respectively: 0 码力 | 362 页 | 1.29 MB | 2 年前3
Falcon v3.0.1 Documentationresponder JSONTranslator.process_response - Sinks: /search/(?Pddg|y)\Z SinkAdapter Error handlers: StorageError handle Note that this example requires the httpx package in lieu of requests. # are designed to set the response headers and body appropriately for each error type. Tip: Error handlers may be registered for any type, including HTTPError. This feature provides a central location for form – by installing an appropriate media handler. Let us extend the multipart form parser media handlers to recursively parse embedded forms of the multipart/mixed content type: import falcon import falcon 0 码力 | 344 页 | 1.16 MB | 2 年前3
共 1000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 100













