1
0
mirror of https://github.com/actix/examples synced 2025-06-28 18:00:37 +02:00
This commit is contained in:
Rob Ede
2022-02-18 02:44:02 +00:00
parent aca1dab890
commit fbd3b228e9
48 changed files with 103 additions and 261 deletions

View File

@ -1,6 +1,4 @@
use actix_web::{
error, middleware, web, App, Error, HttpRequest, HttpResponse, HttpServer,
};
use actix_web::{error, middleware, web, App, Error, HttpRequest, HttpResponse, HttpServer};
use futures::StreamExt;
use json::JsonValue;
use serde::{Deserialize, Serialize};
@ -92,10 +90,9 @@ mod tests {
#[actix_web::test]
async fn test_index() {
let app = test::init_service(
App::new().service(web::resource("/").route(web::post().to(index))),
)
.await;
let app =
test::init_service(App::new().service(web::resource("/").route(web::post().to(index))))
.await;
let req = test::TestRequest::post()
.uri("/")