Tornado 6.5 Documentation
your code in the same way you would if it were synchronous. This is especially important for error handling, since try/except blocks work as you would expect in coroutines while this is difficult to achieve RequestHandler for all your specific handlers. Handling request input The request handler can access the object representing the current request with self.request. See the class definition for HTTPServerRequest HTTPServerRequest for a complete list of attributes. Request data in the formats used by HTML forms will be parsed for you and is made available in methods like get_query_argument and get_body_argument. class0 码力 | 272 页 | 1.12 MB | 2 月前3Tornado 6.5 Documentation
main coroutine The Application object Subclassing RequestHandler Handling request input Overriding RequestHandler methods Error Handling Redirection Asynchronous handlers Templates and UI Configuring and security Cookies and signed cookies User authentication Third party authentication Cross-site request forgery protection DNS Rebinding Running and deploying Processes and ports Running behind a load your code in the same way you would if it were synchronous. This is especially important for error handling, since try/except blocks work as you would expect in coroutines while this is difficult to achieve0 码力 | 437 页 | 405.14 KB | 2 月前3Rust 程序设计语言 简体中文版 1.85.0
Compiling error-handling v0.1.0 (file:///projects/error-handling) Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.73s Running `target/debug/error-handling` thread 'main' panicked main 函数的返回类型是 () 而不是 Result。当编译这些代码,会得到如下错误信息: $ cargo run Compiling error-handling v0.1.0 (file:///projects/error-handling) error[E0277]: the `?` operator can only be used in a function that returns information about this error, try `rustc --explain E0277`. error: could not compile `error-handling` (bin "error-handling") due to 1 previous error 这个错误指出只能在返回 Result、Option 或者其它实现了 FromResidual 的类型的函数中使用0 码力 | 562 页 | 3.23 MB | 9 天前3
共 3 条
- 1