/** * Extracts an attribute from the request cookies. * * @param attribute * The name of the request attribute to set. * @param cookieName * The name of the cookies to extract. * @param first * Indicates if only the first cookie should be set. Otherwise as * a List instance might be set in the attribute value. * @return The current Filter. */ public Route extractCookie(String attribute, String cookieName, boolean first) { getCookieExtracts().add(new ExtractInfo(attribute, cookieName, first)); return this; }
if (!getCookieExtracts().isEmpty()) { final Series<Cookie> cookies = request.getCookies(); for (final ExtractInfo ei : getCookieExtracts()) { if (ei.first) { request.getAttributes().put(ei.attribute,