
net.lightbody.bmp.proxy.http.BlankCookieStore Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of browsermob-proxy Show documentation
Show all versions of browsermob-proxy Show documentation
A programmatic HTTP/S designed for performance and functional testing
package net.lightbody.bmp.proxy.http;
import net.lightbody.bmp.core.har.HarCookie;
import org.apache.http.client.CookieStore;
import org.apache.http.cookie.Cookie;
import java.util.Collections;
import java.util.Date;
import java.util.List;
public class BlankCookieStore implements CookieStore {
@Override
public void addCookie(Cookie cookie) {
HarCookie hc = new HarCookie();
hc.setDomain(cookie.getDomain());
hc.setExpires(cookie.getExpiryDate());
hc.setName(cookie.getName());
hc.setValue(cookie.getValue());
hc.setPath(cookie.getPath());
RequestInfo.get().getEntry().getResponse().getCookies().add(hc);
}
@Override
public List getCookies() {
return Collections.emptyList();
}
@Override
public boolean clearExpired(Date date) {
return false;
}
@Override
public void clear() {
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy