mirror of
https://github.com/actix/actix-extras.git
synced 2025-06-25 18:09:22 +02:00
update examples
This commit is contained in:
@ -34,9 +34,9 @@ fn main() {
|
||||
// enable logger
|
||||
.middleware(middlewares::Logger::default())
|
||||
// register simple handler, handle all methods
|
||||
.handler("/index.html", index)
|
||||
.route("/index.html", |r| r.f(index))
|
||||
// with path parameters
|
||||
.resource("/", |r| r.handler(Method::GET, |req| {
|
||||
.resource("/", |r| r.method(Method::GET).f(|req| {
|
||||
httpcodes::HTTPFound
|
||||
.build()
|
||||
.header("LOCATION", "/index.html")
|
||||
|
Reference in New Issue
Block a user