You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Could we have a connect_with_url() method? I'm thinking to basically move use what you are doing in connect_with_defaults, and then call this method from connect with defaults().
pubfnconnect_with_defaults() -> Result<Docker,Error>{let host = env::var("DOCKER_HOST").unwrap_or_else(|_| DEFAULT_DOCKER_HOST.to_string());Self::connect_with_url(host)}pubfnconnect_with_url(host:&str) -> Result<Docker,Error>{match host {#[cfg(unix)]
h if h.starts_with("unix://") => {Docker::connect_with_unix(&h,DEFAULT_TIMEOUT,API_DEFAULT_VERSION)}#[cfg(windows)]
h if h.starts_with("npipe://") => {Docker::connect_with_named_pipe(&h,DEFAULT_TIMEOUT,API_DEFAULT_VERSION)}
h if h.starts_with("tcp://") || h.starts_with("http://") => {#[cfg(feature = "ssl")]if env::var("DOCKER_TLS_VERIFY").is_ok(){returnDocker::connect_with_ssl_defaults();}Docker::connect_with_http_defaults()}#[cfg(feature = "ssl")]
h if h.starts_with("https://") => Docker::connect_with_ssl_defaults(),
_ => Err(UnsupportedURISchemeError{uri: host.to_string(),}),}}
The text was updated successfully, but these errors were encountered:
Hi, jumping here because I'm also interested in this issue. It would be nice to allow setting headers as well to set custom User-Agent from clients consuming the library. It would be even much better to accept a http request to make the client fully configurable.
Could we have a
connect_with_url()
method? I'm thinking to basically move use what you are doing inconnect_with_defaults
, and then call this method fromconnect with defaults()
.The text was updated successfully, but these errors were encountered: