mirror of
https://github.com/ntex-rs/ntex.git
synced 2025-04-06 22:37:39 +03:00
refactor error handling
This commit is contained in:
parent
c565965865
commit
de71ad7de4
18 changed files with 317 additions and 325 deletions
|
@ -19,7 +19,8 @@ fn index(req: &mut HttpRequest, mut _payload: Payload, state: &()) -> HttpRespon
|
|||
}
|
||||
|
||||
/// somple handle
|
||||
fn index_async(req: &mut HttpRequest, _payload: Payload, state: &()) -> Once<actix_web::Frame, ()>
|
||||
fn index_async(req: &mut HttpRequest, _payload: Payload, state: &())
|
||||
-> Once<actix_web::Frame, actix_web::error::Error>
|
||||
{
|
||||
println!("{:?}", req);
|
||||
|
||||
|
@ -49,7 +50,7 @@ fn main() {
|
|||
HttpServer::new(
|
||||
Application::default("/")
|
||||
// enable logger
|
||||
.middleware(middlewares::Logger::default())
|
||||
//.middleware(middlewares::Logger::default())
|
||||
// register simple handle r, handle all methods
|
||||
.handler("/index.html", index)
|
||||
// with path parameters
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue