CookieJar is an object for storing cookies that are set by the server, added by the client, or both. As described in the how-to guide on using Cookies, k6 handles cookies automatically by default. If you need more control over cookies you can however create your own cookie jar and select it as the active jar (instead of the default one created by k6) for one or more requests.
|cookiesForURL(url)||Get Object of cookies where the key is the cookie name and the value is an array.|
|set(url, name, value, [options])||Set a cookie in the jar by specifying name, value and some other optional settings like domain, path etc.|
|clear(url)||Delete all cookies for the given URL.|
|delete(url, name)||Deletes the name cookie for the given URL.|