diff --git a/src/client/http.rs b/src/client/http.rs index 4cc9e611..16f393ac 100644 --- a/src/client/http.rs +++ b/src/client/http.rs @@ -1695,31 +1695,6 @@ impl ClientRef { } } - /// Injects a 'Cookie' into the 'CookieStore' for the specified URL, using references to `HeaderValue`. - /// - /// This method accepts a collection of cookies by reference, which can be either a slice (`&[&'a HeaderValue]`). - /// It will map each reference to the value of `HeaderValue` and pass the resulting iterator to the `cookie_store` - /// for processing. - /// - /// # Parameters - /// - `url`: The URL associated with the cookies to be set. - /// - `cookies`: A collection of references to `HeaderValue` items. - /// - /// This method ensures that cookies are only set if at least one cookie - /// exists in the collection. - #[cfg(feature = "cookies")] - pub fn set_cookies_by_ref<'a, C>(&self, url: &Url, cookies: C) - where - C: AsRef<[&'a HeaderValue]>, - { - if let Some(ref cookie_store) = self.inner.cookie_store { - let mut cookies = cookies.as_ref().iter().copied().peekable(); - if cookies.peek().is_some() { - cookie_store.set_cookies(&mut cookies, url); - } - } - } - /// Clears all cookies from the `CookieStore`. /// /// This method removes all cookies stored in the client's `CookieStore`.