mirror of
https://github.com/actix/actix-website
synced 2025-02-13 08:32:20 +01:00
16 lines
490 B
Rust
16 lines
490 B
Rust
|
// <streaming>
|
||
|
// use actix_web::{error, web, Error, HttpResponse};
|
||
|
// use futures::{future::result, Future, Stream};
|
||
|
|
||
|
// fn index(payload: web::Payload) -> Box<Future<Item = HttpResponse, Error = Error>> {
|
||
|
// payload
|
||
|
// .from_err()
|
||
|
// .fold((), |_, chunk| {
|
||
|
// println!("Chunk: {:?}", chunk);
|
||
|
// result::<_, error::PayloadError>(Ok(()))
|
||
|
// })
|
||
|
// .map(|_| HttpResponse::Ok().finish())
|
||
|
// .responder()
|
||
|
// }
|
||
|
// </streaming>
|