mirror of
https://github.com/actix/actix-extras.git
synced 2025-06-26 02:19:22 +02:00
refactor TransferEncoding; allow to use client api with threaded tokio runtime
This commit is contained in:
@ -7,7 +7,7 @@ use std::{fmt, io, str};
|
||||
use base64;
|
||||
use bytes::Bytes;
|
||||
use cookie::Cookie;
|
||||
use futures::unsync::mpsc::{unbounded, UnboundedSender};
|
||||
use futures::sync::mpsc::{unbounded, UnboundedSender};
|
||||
use futures::{Async, Future, Poll, Stream};
|
||||
use http::header::{self, HeaderName, HeaderValue};
|
||||
use http::{Error as HttpError, HttpTryFrom, StatusCode};
|
||||
@ -16,14 +16,14 @@ use sha1::Sha1;
|
||||
|
||||
use actix::prelude::*;
|
||||
|
||||
use body::{Binary, Body};
|
||||
use body::Binary;
|
||||
use error::{Error, UrlParseError};
|
||||
use header::IntoHeaderValue;
|
||||
use httpmessage::HttpMessage;
|
||||
use payload::PayloadHelper;
|
||||
|
||||
use client::{
|
||||
ClientConnector, ClientRequest, ClientRequestBuilder, ClientResponse,
|
||||
ClientBody, ClientConnector, ClientRequest, ClientRequestBuilder, ClientResponse,
|
||||
HttpResponseParserError, SendRequest, SendRequestError,
|
||||
};
|
||||
|
||||
@ -283,7 +283,7 @@ impl ClientHandshake {
|
||||
);
|
||||
|
||||
let (tx, rx) = unbounded();
|
||||
request.set_body(Body::Streaming(Box::new(rx.map_err(|_| {
|
||||
request.set_body(ClientBody::Streaming(Box::new(rx.map_err(|_| {
|
||||
io::Error::new(io::ErrorKind::Other, "disconnected").into()
|
||||
}))));
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
use futures::sync::oneshot::Sender;
|
||||
use futures::unsync::oneshot;
|
||||
use futures::sync::oneshot::{self, Sender};
|
||||
use futures::{Async, Poll};
|
||||
use smallvec::SmallVec;
|
||||
|
||||
|
Reference in New Issue
Block a user