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

            headers: {
            tags: {

does not work either.

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

1 Like

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