public static List<HttpCookie> cookies(final List<FromServer.Header<?>> headers) { final List<HttpCookie> cookies = new ArrayList<>(); for(FromServer.Header<?> header : headers) { if(header.getKey().equalsIgnoreCase("Set-Cookie") || header.getKey().equalsIgnoreCase("Set-Cookie2")) { final List<?> found = (List<?>) header.getParsed(); for(Object o : found) { cookies.add((HttpCookie) o); } } } return Collections.unmodifiableList(cookies); }
public static List<HttpCookie> cookies(final List<FromServer.Header<?>> headers) { final List<HttpCookie> cookies = new ArrayList<>(); for (FromServer.Header<?> header : headers) { if (header.getKey().equalsIgnoreCase("Set-Cookie") || header.getKey().equalsIgnoreCase("Set-Cookie2")) { final List<?> found = (List<?>) header.getParsed(); for (Object o : found) { cookies.add((HttpCookie) o); } } } return Collections.unmodifiableList(cookies); }
public static List<HttpCookie> cookies(final List<FromServer.Header<?>> headers) { final List<HttpCookie> cookies = new ArrayList<>(); for (FromServer.Header<?> header : headers) { if (header.getKey().equalsIgnoreCase("Set-Cookie") || header.getKey().equalsIgnoreCase("Set-Cookie2")) { final List<?> found = (List<?>) header.getParsed(); for (Object o : found) { cookies.add((HttpCookie) o); } } } return Collections.unmodifiableList(cookies); }