1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-06-25 18:09:22 +02:00

refactor payload related futures for HttpRequest

This commit is contained in:
Nikolay Kim
2018-02-25 20:34:26 +03:00
parent ab5ed27bf1
commit a2b98b31e8
7 changed files with 109 additions and 111 deletions

View File

@ -22,7 +22,7 @@ fn index(mut req: HttpRequest) -> Result<HttpResponse> {
println!("{:?}", req);
// example of ...
if let Ok(ch) = req.payload_mut().readany().poll() {
if let Ok(ch) = req.poll() {
if let futures::Async::Ready(Some(d)) = ch {
println!("{}", String::from_utf8_lossy(d.as_ref()));
}