MCPcopy Create free account
hub / github.com/Recordscript/recordscript / set_basic_auth

Method set_basic_auth

libs/hbb_common/src/proxy.rs:180–190  ·  view source on GitHub ↗
(&mut self, username: T, password: U)

Source from the content-addressed store, hash-verified

178 }
179
180 fn set_basic_auth<T: Into<String>, U: Into<String>>(&mut self, username: T, password: U) {
181 let auth = Auth {
182 user_name: username.into(),
183 password: password.into(),
184 };
185 match self {
186 ProxyScheme::Http { auth: a, .. } => *a = Some(auth),
187 ProxyScheme::Https { auth: a, .. } => *a = Some(auth),
188 ProxyScheme::Socks5 { auth: a, .. } => *a = Some(auth),
189 }
190 }
191
192 fn parse(url: Url) -> Result<Self, ProxyError> {
193 use url::Position;

Callers 2

parseMethod · 0.80
basic_authMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected