diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2020-01-16 16:10:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-16 16:10:01 +0100 |
commit | 1de02b0643bb21d89ce049943d2d2d27fb510ed0 (patch) | |
tree | 3b8c65b8bb5b0511452e8438f996fbe7dad41dfc /cli/ops/fetch.rs | |
parent | 91757f63fdc04f5844b58a8c0b76df601e84ac72 (diff) |
perf: share http client in file fetcher (#3683)
Diffstat (limited to 'cli/ops/fetch.rs')
-rw-r--r-- | cli/ops/fetch.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/ops/fetch.rs b/cli/ops/fetch.rs index 6779f14e2..e084fdeff 100644 --- a/cli/ops/fetch.rs +++ b/cli/ops/fetch.rs @@ -1,7 +1,7 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. use super::dispatch_json::{Deserialize, JsonOp, Value}; use super::io::StreamResource; -use crate::http_util::{get_client, HttpBody}; +use crate::http_util::{create_http_client, HttpBody}; use crate::ops::json_op; use crate::state::ThreadSafeState; use deno_core::*; @@ -31,7 +31,7 @@ pub fn op_fetch( let args: FetchArgs = serde_json::from_value(args)?; let url = args.url; - let client = get_client(); + let client = create_http_client(); let method = match args.method { Some(method_str) => Method::from_bytes(method_str.as_bytes())?, |