1
0
mirror of https://github.com/actix/examples synced 2025-02-02 09:39:03 +01:00

Fix json example Travis build failure

This commit is contained in:
Dan Munckton 2018-08-27 21:01:30 +01:00
parent a677dc8a92
commit 8bf305f04c

View File

@ -110,14 +110,14 @@ fn main() {
.middleware(middleware::Logger::default()) .middleware(middleware::Logger::default())
.resource("/extractor", |r| { .resource("/extractor", |r| {
r.method(http::Method::POST) r.method(http::Method::POST)
.with_config(extract_item, |cfg| { .with_config(extract_item, |(cfg,)| {
cfg.limit(4096); // <- limit size of the payload cfg.limit(4096); // <- limit size of the payload
}) })
}) })
.resource("/extractor2", |r| { .resource("/extractor2", |r| {
r.method(http::Method::POST) r.method(http::Method::POST)
.with_config(extract_item_limit, |cfg| { .with_config(extract_item_limit, |((cfg, _),)| {
cfg.0.limit(4096); // <- limit size of the payload cfg.limit(4096); // <- limit size of the payload
}) })
}) })
.resource("/manual", |r| r.method(http::Method::POST).f(index_manual)) .resource("/manual", |r| r.method(http::Method::POST).f(index_manual))