1
0
mirror of https://github.com/actix/examples synced 2025-06-28 09:50:36 +02:00

upgrade example to actix-web 0.7

This commit is contained in:
Nikolay Kim
2018-07-16 12:36:53 +06:00
parent 0b52c7850e
commit 2cc1b23761
57 changed files with 913 additions and 693 deletions

View File

@ -10,6 +10,7 @@ path = "src/main.rs"
[dependencies]
env_logger = "0.5"
actix = "0.5"
actix-web = { version = "^0.6", features=["alpn"] }
openssl = { version="0.10" }
actix = "0.7"
#actix-web = "^0.7"
actix-web = { git = "https://github.com/actix/actix-web.git" }

View File

@ -8,7 +8,7 @@ use actix_web::{http, middleware, server, App, Error, HttpRequest, HttpResponse}
use openssl::ssl::{SslAcceptor, SslFiletype, SslMethod};
/// simple handle
fn index(req: HttpRequest) -> Result<HttpResponse, Error> {
fn index(req: &HttpRequest) -> Result<HttpResponse, Error> {
println!("{:?}", req);
Ok(HttpResponse::Ok()
.content_type("text/plain")