src/client/http_client.rs: cleanup, remove debug println
This commit is contained in:
parent
b57cb26406
commit
10130cf48c
|
@ -269,8 +269,6 @@ impl HttpClient {
|
||||||
})
|
})
|
||||||
.flatten()
|
.flatten()
|
||||||
.and_then(|upgraded| {
|
.and_then(|upgraded| {
|
||||||
println!("upgraded");
|
|
||||||
|
|
||||||
h2::client::handshake(upgraded).map_err(Error::from)
|
h2::client::handshake(upgraded).map_err(Error::from)
|
||||||
})
|
})
|
||||||
.and_then(|(h2, connection)| {
|
.and_then(|(h2, connection)| {
|
||||||
|
@ -411,8 +409,10 @@ impl H2Client {
|
||||||
request: Request<()>,
|
request: Request<()>,
|
||||||
) -> impl Future<Item=Value, Error=Error> {
|
) -> impl Future<Item=Value, Error=Error> {
|
||||||
|
|
||||||
self.h2.clone().ready().map_err(Error::from).
|
self.h2.clone()
|
||||||
and_then(move |mut send_request| {
|
.ready()
|
||||||
|
.map_err(Error::from)
|
||||||
|
.and_then(move |mut send_request| {
|
||||||
// fixme: what about stream/upload?
|
// fixme: what about stream/upload?
|
||||||
let (response, _stream) = send_request.send_request(request, true).unwrap();
|
let (response, _stream) = send_request.send_request(request, true).unwrap();
|
||||||
response
|
response
|
||||||
|
@ -437,7 +437,6 @@ impl H2Client {
|
||||||
|
|
||||||
body
|
body
|
||||||
.map(move |chunk| {
|
.map(move |chunk| {
|
||||||
println!("RX: {} bytes", chunk.len());
|
|
||||||
// Let the server send more data.
|
// Let the server send more data.
|
||||||
let _ = release_capacity.release_capacity(chunk.len());
|
let _ = release_capacity.release_capacity(chunk.len());
|
||||||
chunk
|
chunk
|
||||||
|
@ -445,7 +444,6 @@ impl H2Client {
|
||||||
.concat2()
|
.concat2()
|
||||||
.map_err(Error::from)
|
.map_err(Error::from)
|
||||||
.and_then(move |data| {
|
.and_then(move |data| {
|
||||||
println!("RX: {:?}", data);
|
|
||||||
let text = String::from_utf8(data.to_vec()).unwrap();
|
let text = String::from_utf8(data.to_vec()).unwrap();
|
||||||
if status.is_success() {
|
if status.is_success() {
|
||||||
if text.len() > 0 {
|
if text.len() > 0 {
|
||||||
|
|
Loading…
Reference in New Issue