(req: &mut http::Request<()>, token: Option<&str>)
| 253 | |
| 254 | #[cfg(not(feature = "browser"))] |
| 255 | fn request_insert_auth_header(req: &mut http::Request<()>, token: Option<&str>) { |
| 256 | if let Some(token) = token { |
| 257 | let auth = ["Bearer ", token].concat().try_into().unwrap(); |
| 258 | req.headers_mut().insert(http::header::AUTHORIZATION, auth); |
| 259 | } |
| 260 | } |
| 261 | |
| 262 | #[cfg(feature = "browser")] |
| 263 | async fn fetch_ws_token(host: &Uri, auth_token: &str) -> Result<String, WsError> { |
no test coverage detected
searching dependent graphs…