
net.lightbody.bmp.proxy.Test 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;
import com.google.inject.Guice;
import com.google.inject.Injector;
import com.google.sitebricks.SitebricksModule;
import com.google.sitebricks.client.Web;
import com.google.sitebricks.client.WebResponse;
import com.google.sitebricks.client.transport.Json;
import net.lightbody.bmp.core.har.Har;
public class Test {
public static void main(String[] args) {
Injector injector = Guice.createInjector(new SitebricksModule());
WebResponse response = injector.getInstance(Web.class)
.clientOf("http://localhost:8080/proxy/9091/har")
.transports(Har.class)
.over(Json.class).get();
Har har = response.to(Har.class).using(Json.class);
System.out.println(har.getLog().getBrowser().getName());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy