You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to set cookies in an AgentBuilder you need to create a CookieStore, however ureq doesn't re-export it: to do so you need to explicitly depend on either the cookie or the cookie_store crates.
However this is not just poor ergonomics, it creates a semver hazard: since the direct dependency is not linked to ureq's, and 0.x updates are considered not compatible semver-wise, any update to ureq's cookie dependency is a breaking change1 because it results in two copies of the cookie/cookie_store crate.
This in particular happened with the 2.5.0 update, which broke a project of mine that used ureq with cookies.
My preferred fix would be to expose CookieStore and allow using that instead of depending on an external non-synced crate. Note that Cookie is already re-exported.
Footnotes
technically you can avoid naming CookieStore, but it requires some weird hack to make type inference work, so it's something you probably want to avoid. ↩
The text was updated successfully, but these errors were encountered:
In order to set cookies in an
AgentBuilder
you need to create aCookieStore
, howeverureq
doesn't re-export it: to do so you need to explicitly depend on either thecookie
or thecookie_store
crates.However this is not just poor ergonomics, it creates a semver hazard: since the direct dependency is not linked to
ureq
's, and0.x
updates are considered not compatible semver-wise, any update toureq
'scookie
dependency is a breaking change1 because it results in two copies of thecookie
/cookie_store
crate.This in particular happened with the 2.5.0 update, which broke a project of mine that used
ureq
with cookies.My preferred fix would be to expose
CookieStore
and allow using that instead of depending on an external non-synced crate. Note thatCookie
is already re-exported.Footnotes
technically you can avoid naming
CookieStore
, but it requires some weird hack to make type inference work, so it's something you probably want to avoid. ↩The text was updated successfully, but these errors were encountered: