(&self, py: Python, url: PyBackedStr, cookie: Cookie)
| 429 | /// Sets the cookies for the given URL. |
| 430 | #[pyo3(signature = (url, cookie))] |
| 431 | pub fn set_cookie(&self, py: Python, url: PyBackedStr, cookie: Cookie) -> PyResult<()> { |
| 432 | py.allow_threads(|| { |
| 433 | let url = Url::parse(url.as_ref()).map_err(Error::from)?; |
| 434 | self.0.set_cookie(&url, cookie.0); |
| 435 | Ok(()) |
| 436 | }) |
| 437 | } |
| 438 | |
| 439 | /// Removes the cookie with the given name for the given URL. |
| 440 | #[pyo3(signature = (url, name))] |
no outgoing calls