.service(echo) .service(echo) .service(echo) .service(echo)
.service(echo) .service(echo) .service(echo) .service(echo)
HttpResponse, HttpResponse, HttpResponse, HttpResponse,
HttpResponse::Ok().body("Hey HttpResponse::Ok().body("Hey
.service(echo) .service(echo) .service(echo) .service(echo)
std::io::Result<()> std::io::Result<()> std::io::Result<()>
#[actix_web::main] #[actix_web::main] #[actix_web::main]
Responder}; Responder}; Responder}; Responder}; Responder};
#[post("/echo")] #[post("/echo")] #[post("/echo")]
Responder}; Responder}; Responder}; Responder}; Responder};
.route("/hey", .route("/hey", .route("/hey", .route("/hey",
there!") there!") there!") there!") there!") there!")
HttpResponse::Ok().body("Hello HttpResponse::Ok().body("Hello
.service(echo) .service(echo) .service(echo) .service(echo)
HttpResponse, HttpResponse, HttpResponse, HttpResponse,
HttpResponse, HttpResponse, HttpResponse, HttpResponse,
HttpServer::new(|| HttpServer::new(|| HttpServer::new(||
HttpResponse::Ok().body("Hello HttpResponse::Ok().body("Hello
HttpResponse::Ok().body("Hello HttpResponse::Ok().body("Hello
.service(echo) .service(echo) .service(echo) .service(echo)
.service(hello) .service(hello) .service(hello) .service(hello)
hello() hello() hello() hello() hello() hello() hello()
.service(hello) .service(hello) .service(hello) .service(hello)
.bind(("0.0.0.0", .bind(("0.0.0.0", .bind(("0.0.0.0",
hello() hello() hello() hello() hello() hello() hello()
HttpServer, HttpServer, HttpServer, HttpServer, HttpServer,
.service(echo) .service(echo) .service(echo) .service(echo)
HttpResponse::Ok().body(req_body) HttpResponse::Ok().body(req_body)
world!") world!") world!") world!") world!") world!")
HttpResponse::Ok().body("Hey HttpResponse::Ok().body("Hey
actix_web::{get, actix_web::{get, actix_web::{get,
8080))? 8080))? 8080))? 8080))? 8080))? 8080))? 8080))?
8080))? 8080))? 8080))? 8080))? 8080))? 8080))? 8080))?
#[get("/")] #[get("/")] #[get("/")] #[get("/")] #[get("/")]
HttpResponse, HttpResponse, HttpResponse, HttpResponse,
hello() hello() hello() hello() hello() hello() hello()
HttpResponse, HttpResponse, HttpResponse, HttpResponse,
Responder}; Responder}; Responder}; Responder}; Responder};
HttpResponse::Ok().body(req_body) HttpResponse::Ok().body(req_body)
.service(echo) .service(echo) .service(echo) .service(echo)
actix_web::{get, actix_web::{get, actix_web::{get,
String) String) String) String) String) String) String)
HttpResponse::Ok().body("Hello HttpResponse::Ok().body("Hello
#[post("/echo")] #[post("/echo")] #[post("/echo")]
there!") there!") there!") there!") there!") there!")
actix_web::{get, actix_web::{get, actix_web::{get,
#[post("/echo")] #[post("/echo")] #[post("/echo")]
echo(req_body: echo(req_body: echo(req_body: echo(req_body:
HttpServer, HttpServer, HttpServer, HttpServer, HttpServer,
HttpResponse::Ok().body("Hey HttpResponse::Ok().body("Hey
there!") there!") there!") there!") there!") there!")
8080))? 8080))? 8080))? 8080))? 8080))? 8080))? 8080))?
.bind(("0.0.0.0", .bind(("0.0.0.0", .bind(("0.0.0.0",
.route("/hey", .route("/hey", .route("/hey", .route("/hey",
std::io::Result<()> std::io::Result<()> std::io::Result<()>
#[actix_web::main] #[actix_web::main] #[actix_web::main]
.service(hello) .service(hello) .service(hello) .service(hello)
.route("/hey", .route("/hey", .route("/hey", .route("/hey",
#[post("/echo")] #[post("/echo")] #[post("/echo")]
#[actix_web::main] #[actix_web::main] #[actix_web::main]
String) String) String) String) String) String) String)
actix_web::{get, actix_web::{get, actix_web::{get,
Responder}; Responder}; Responder}; Responder}; Responder};
String) String) String) String) String) String) String)
String) String) String) String) String) String) String)