MCPcopy Create free account
hub / github.com/0x676e67/wreq-python / set_cookie

Method set_cookie

src/client/async_impl/mod.rs:431–437  ·  view source on GitHub ↗
(&self, py: Python, url: PyBackedStr, cookie: Cookie)

Source from the content-addressed store, hash-verified

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))]

Callers 1

test_set_cookieFunction · 0.95

Calls

no outgoing calls

Tested by 1

test_set_cookieFunction · 0.76