mirror of
https://github.com/denoland/deno.git
synced 2024-11-22 15:06:54 -05:00
Support https in fetch.
fetch should use same hyper connector as import.
This commit is contained in:
parent
31de3b938c
commit
9b8f77f525
1 changed files with 2 additions and 2 deletions
|
@ -3,6 +3,7 @@ use errors;
|
||||||
use errors::permission_denied;
|
use errors::permission_denied;
|
||||||
use errors::{DenoError, DenoResult, ErrorKind};
|
use errors::{DenoError, DenoResult, ErrorKind};
|
||||||
use fs as deno_fs;
|
use fs as deno_fs;
|
||||||
|
use http_util;
|
||||||
use isolate::Buf;
|
use isolate::Buf;
|
||||||
use isolate::Isolate;
|
use isolate::Isolate;
|
||||||
use isolate::IsolateState;
|
use isolate::IsolateState;
|
||||||
|
@ -18,7 +19,6 @@ use futures::future::poll_fn;
|
||||||
use futures::Poll;
|
use futures::Poll;
|
||||||
use hyper;
|
use hyper;
|
||||||
use hyper::rt::{Future, Stream};
|
use hyper::rt::{Future, Stream};
|
||||||
use hyper::Client;
|
|
||||||
use remove_dir_all::remove_dir_all;
|
use remove_dir_all::remove_dir_all;
|
||||||
use std;
|
use std;
|
||||||
use std::fs;
|
use std::fs;
|
||||||
|
@ -403,7 +403,7 @@ fn op_fetch_req(
|
||||||
}
|
}
|
||||||
|
|
||||||
let url = url.parse::<hyper::Uri>().unwrap();
|
let url = url.parse::<hyper::Uri>().unwrap();
|
||||||
let client = Client::new();
|
let client = http_util::get_client();
|
||||||
|
|
||||||
debug!("Before fetch {}", url);
|
debug!("Before fetch {}", url);
|
||||||
let future = client.get(url).and_then(move |res| {
|
let future = client.get(url).and_then(move |res| {
|
||||||
|
|
Loading…
Reference in a new issue