classafButter::StickyCookiesMiddleware
sys::Obj afButter::StickyCookiesMiddleware : afButter::ButterMiddleware
(Middleware) - Stores cookies found in response objects and sets them in subsequent requests. This effectively gives you a session when querying web applications.
StickyCookiesMiddleware
inspects the Max-Age
attribute of the cookies and automatically expires them when required.
StickyCookiesMiddleware
does not respect the Domain, Path and Secure attributes.
- addCookie
Sets the the cookie to be included in the next request
- allCookies
Cookie[] allCookies()
A read only list of all cookies held.
- getCookie
@
Operator
Cookie? getCookie(Str cookieName)Returns a cookie by name. Returns
null
if not found.- removeCookie
Cookie? removeCookie(Str cookieName)
Deletes a cookie by name, returning the deleted cookie. Returns
null
if the cookie was not found.