Closed ernestas-poskus closed 6 years ago
+1 This would also be helpful for using connectors such as SOCKS proxies.
cc @seanmonstar please advise how to proceed with this change, you have released new version with new new_
private function on HttpsConnector
.. For my use case I need to pass constructed HttpConnector
to this struct because I set additional configuration on it such as
let mut http_connector: HttpConnector =
HttpConnector::new_with_executor(executor.clone(), None);
http_connector.set_keepalive(self.hyper_keep_alive_timeout);
http_connector.set_nodelay(self.hyper_no_delay);
http_connector.enforce_http(self.hyper_enforce_http);
Sorry I forgot about this! It seems what you want to do can be done with the from
constructor. HttpsConnector::from((http, tls))
.
Awesome :+1:
This allow to create HttpsConnector with hyper's default HttpConnector reason behind this is extra configuration for HttpConnector like
set_nodelay
and newset_local_address
https://github.com/hyperium/hyper/blob/master/src/client/connect.rs#L254cc @seanmonstar