Fix cookie jar not updating during chained requests

https://feedback.yaak.app/p/request-chaining-cookie-not-appear
This commit is contained in:
Gregory Schier
2025-05-25 07:04:40 -07:00
parent 4d1dda0786
commit 9ec9222216

View File

@@ -153,7 +153,10 @@ pub async fn send_http_request<R: Runtime>(
// Add cookie store if specified
let maybe_cookie_manager = match cookie_jar.clone() {
Some(cj) => {
Some(CookieJar { id, .. }) => {
// NOTE: WE need to refetch the cookie jar because a chained request might have
// updated cookies when we rendered the request.
let cj = window.db().get_cookie_jar(&id)?;
// HACK: Can't construct Cookie without serde, so we have to do this
let cookies = cj
.cookies