HTTP Helpers

Dealing with Cookies

Cookie support is enabled by default and then Gatling handles Cookies transparently, just like a browser would.

However, some use cases require a more fine grain control.

Flushing Session Cookies

One might want to simulate closing a browser, so Session cookies are dropped but permanent cookies are still there:

exec(flushSessionCookies)

Flushing All Cookies

One might want to flush the whole CookieJar:

exec(flushCookieJar)

Dealing with Caching

Flushing the Cache

One might want to flush the whole HTTP cache (for the virtual user) :

exec(flushHttpCache)