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

Source

Void addCookie(Cookie cookie)

Sets the the cookie to be included in the next request

allCookies

Source

Cookie[] allCookies()

A read only list of all cookies held.

getCookie

Source

@Operator
Cookie? getCookie(Str cookieName)

Returns a cookie by name. Returns null if not found.

removeCookie

Source

Cookie? removeCookie(Str cookieName)

Deletes a cookie by name, returning the deleted cookie. Returns null if the cookie was not found.