mirror of
https://github.com/actix/examples
synced 2025-06-26 17:17:42 +02:00
upgrade to beta3
This commit is contained in:
@ -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"
|
||||
|
@ -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(
|
||||
|
Reference in New Issue
Block a user