@Put
@At("/:port/har")
public Reply<?> newHar(@Named("port") int port, Request request) {
String initialPageRef = request.param("initialPageRef");
ProxyServer proxy = proxyManager.get(port);
Har oldHar = proxy.newHar(initialPageRef);
String captureHeaders = request.param("captureHeaders");
String captureContent = request.param("captureContent");
proxy.setCaptureHeaders(Boolean.parseBoolean(captureHeaders));
proxy.setCaptureContent(Boolean.parseBoolean(captureContent));