1
0
mirror of https://github.com/actix/examples synced 2025-06-26 17:17:42 +02:00

upgrade to beta3

This commit is contained in:
Nikolay Kim
2019-05-04 21:52:24 -07:00
parent d571ee5abb
commit 8de183768c
33 changed files with 70 additions and 80 deletions

View File

@ -6,7 +6,7 @@ workspace = ".."
edition = "2018"
[dependencies]
actix-web = "1.0.0-alpha.4"
actix-web = "1.0.0-beta.3"
bytes = "0.4"
futures = "0.1"

View File

@ -83,19 +83,12 @@ fn main() -> std::io::Result<()> {
App::new()
// enable logger
.wrap(middleware::Logger::default())
.data(web::JsonConfig::default().limit(4096)) // <- limit size of the payload (global configuration)
.service(web::resource("/extractor").route(web::post().to(index)))
.service(
web::resource("/extractor").route(
web::post()
.data(web::JsonConfig::default().limit(4096)) // <- limit size of the payload
.to(index),
),
)
.service(
web::resource("/extractor2").route(
web::post()
.data(web::JsonConfig::default().limit(4096)) // <- limit size of the payload
.to_async(extract_item),
),
web::resource("/extractor2")
.data(web::JsonConfig::default().limit(1024)) // <- limit size of the payload (resource level)
.route(web::post().to_async(extract_item)),
)
.service(web::resource("/manual").route(web::post().to_async(index_manual)))
.service(