Hi there,
my service sets cookies after authentication and I’d like k6 to completely ignore those cookies.
How can I achieve that?
Hi there,
my service sets cookies after authentication and I’d like k6 to completely ignore those cookies.
How can I achieve that?
Hi @emil,
welcome to the community forum
k6 doesn’t have an explicit feature for clear cookies but as a work-around, you could set a local cookie jar or you could set an empty value for the specific case, as the following code:
export default function() {
const jar = http.cookieJar();
jar.set('https://httpbin.org/cookies', 'my_cookie', '')
http.get('https://httpbin.org/cookies');
}
You can find more details about using cookies on the dedicated documentation page.