List of usage examples for org.apache.commons.httpclient HttpState clearCookies
public void clearCookies()
From source file:org.exist.xquery.modules.httpclient.ClearFunction.java
public Sequence eval(Sequence[] args, Sequence contextSequence) throws XPathException { if (isCalledAs("clear-all")) { context.setXQueryContextVar(HTTP_MODULE_PERSISTENT_STATE, null); } else {/*from w w w. ja v a2 s .c o m*/ HttpState state = (HttpState) context.getXQueryContextVar(HTTP_MODULE_PERSISTENT_STATE); if (state != null) { if (isCalledAs("clear-persistent-cookies")) { state.clearCookies(); } else if (isCalledAs("clear-persistent-credentials")) { state.clearCredentials(); } else if (isCalledAs("clear-persistent-proxy-credentials")) { state.clearProxyCredentials(); } } } return (Sequence.EMPTY_SEQUENCE); }
From source file:org.nuxeo.ecm.core.opencmis.impl.client.sso.CasClient.java
public void restoreClientContext() { HttpClient client = HttpURLInstaller.INSTANCE.getClient(); HttpState state = client.getState(); state.clearCookies(); for (Cookie cookie : cookies) { state.addCookie(cookie);//from w w w . j a va2s. co m } }