diff options
Diffstat (limited to 'cli/ops')
-rw-r--r-- | cli/ops/fetch.rs | 6 | ||||
-rw-r--r-- | cli/ops/io.rs | 2 |
2 files changed, 3 insertions, 5 deletions
diff --git a/cli/ops/fetch.rs b/cli/ops/fetch.rs index 9db8d68be..2787b5b7f 100644 --- a/cli/ops/fetch.rs +++ b/cli/ops/fetch.rs @@ -1,13 +1,11 @@ // Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. use super::dispatch_json::{Deserialize, JsonOp, Value}; use super::io::StreamResource; -use crate::http_body::HttpBody; -use crate::http_util::get_client; +use crate::http_util::{get_client, HttpBody}; use crate::ops::json_op; use crate::state::ThreadSafeState; use deno::*; use futures::future::FutureExt; -use futures::StreamExt; use http::header::HeaderName; use http::header::HeaderValue; use http::Method; @@ -66,7 +64,7 @@ pub fn op_fetch( res_headers.push((key.to_string(), val.to_str().unwrap().to_owned())); } - let body = HttpBody::from(res.bytes_stream().boxed()); + let body = HttpBody::from(res); let mut table = state_.lock_resource_table(); let rid = table.add( "httpBody", diff --git a/cli/ops/io.rs b/cli/ops/io.rs index f268adc03..1d832a70e 100644 --- a/cli/ops/io.rs +++ b/cli/ops/io.rs @@ -1,7 +1,7 @@ use super::dispatch_minimal::MinimalOp; use crate::deno_error; use crate::deno_error::bad_resource; -use crate::http_body::HttpBody; +use crate::http_util::HttpBody; use crate::ops::minimal_op; use crate::state::ThreadSafeState; use deno::ErrBox; |