Change Part::stream to reqwest::r#async::Chunk

This commit is contained in:
Bas De Bue
2019-08-05 14:50:42 +02:00
committed by Sean McArthur
parent 8027a2894a
commit 81e0f1ff2a
3 changed files with 41 additions and 10 deletions

View File

@@ -14,7 +14,7 @@ use std::time::Duration;
use futures::{Future, Stream};
use tokio::runtime::current_thread::Runtime;
use reqwest::r#async::Client;
use reqwest::r#async::{Chunk, Client};
use reqwest::r#async::multipart::{Form, Part};
use bytes::Bytes;
@@ -105,7 +105,7 @@ fn response_json() {
fn multipart() {
let _ = env_logger::try_init();
let stream = futures::stream::once::<_, hyper::Error>(Ok(hyper::Chunk::from("part1 part2".to_owned())));
let stream = futures::stream::once::<_, hyper::Error>(Ok(Chunk::from("part1 part2".to_owned())));
let part = Part::stream(stream);
let form = Form::new()