How to override cookies with session.batch

Hi I am trying to remove all the cookies in a httpx session.batch call, so I created an empty jar with const emptyJar = new http.CookieJar(); and tried session.batch(requests, { emptyJar }); but the requests still have the cookies. I also tried putting the emptyJar in each request like below

requests.push([
          'POST',
          url,
          body,
          {
            headers: {
              ...
            },
            tags: {
              ...
            },
            emptyJar,
          }
        ]);

does not work either.

What is the right way to override/remove cookies for httpx session.batch?

Hi @nqin ,

Does the requests.push work if you actually say jar: emptyJar, on that line?

yes! and session.batch(requests, { jar: emptyJar }) works too