{"action":"opened","issue":{"url":"https://api.github.com/repos/lightbody/browsermob-proxy/issues/720","repository_url":"https://api.github.com/repos/lightbody/browsermob-proxy","labels_url":"https://api.github.com/repos/lightbody/browsermob-proxy/issues/720/labels{/name}","comments_url":"https://api.github.com/repos/lightbody/browsermob-proxy/issues/720/comments","events_url":"https://api.github.com/repos/lightbody/browsermob-proxy/issues/720/events","html_url":"https://github.com/lightbody/browsermob-proxy/issues/720","id":278440838,"number":720,"title":"Get only request/response with loading time >= 1 Sec BrowserMob in Java","user":{"login":"sourabhs108","id":34160167,"avatar_url":"https://avatars3.githubusercontent.com/u/34160167?v=4","gravatar_id":"","url":"https://api.github.com/users/sourabhs108","html_url":"https://github.com/sourabhs108","followers_url":"https://api.github.com/users/sourabhs108/followers","following_url":"https://api.github.com/users/sourabhs108/following{/other_user}","gists_url":"https://api.github.com/users/sourabhs108/gists{/gist_id}","starred_url":"https://api.github.com/users/sourabhs108/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sourabhs108/subscriptions","organizations_url":"https://api.github.com/users/sourabhs108/orgs","repos_url":"https://api.github.com/users/sourabhs108/repos","events_url":"https://api.github.com/users/sourabhs108/events{/privacy}","received_events_url":"https://api.github.com/users/sourabhs108/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-12-01T11:42:02Z","updated_at":"2017-12-01T11:42:02Z","closed_at":null,"author_association":"NONE","body":"Is it possible to filter the request/response from .HAR whose loading time is >=1 Sec? I need to save har object into seperate file and upload into har viewer. Below is my code to generate .HAR file.\r\n\r\n//BrowserMobProxy\r\n        BrowserMobProxy server = new BrowserMobProxyServer();\r\n        server.start(0);\r\n        server.setHarCaptureTypes(CaptureType.getAllContentCaptureTypes());\r\n        server.enableHarCaptureTypes(CaptureType.REQUEST_CONTENT, CaptureType.RESPONSE_CONTENT);\r\n        server.newHar(\"Bhaskar\");\r\n\r\n        //PHANTOMJS_CLI_ARGS\r\n        ArrayList<String> cliArgsCap = new ArrayList<>();\r\n        cliArgsCap.add(\"--proxy=localhost:\"+server.getPort());\r\n        cliArgsCap.add(\"--ignore-ssl-errors=yes\");\r\n\r\n        //DesiredCapabilities\r\n        String userAgent = \"Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Mobile Safari/537.36\";\r\n        DesiredCapabilities capabilities = new DesiredCapabilities();\r\n        capabilities.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);\r\n        capabilities.setCapability(CapabilityType.SUPPORTS_JAVASCRIPT, true);\r\n        capabilities.setCapability(\"phantomjs.page.settings.userAgent\", userAgent);\r\n        capabilities.setCapability(PhantomJSDriverService.PHANTOMJS_CLI_ARGS, cliArgsCap);\r\n        capabilities.setCapability(PhantomJSDriverService.PHANTOMJS_EXECUTABLE_PATH_PROPERTY,\"D:/req/phantomjs-2.1.1-windows/bin/phantomjs.exe\");\r\n\r\n        //WebDriver\r\n        WebDriver driver = new PhantomJSDriver(capabilities);\r\n        driver.get(\"https://www.google.com\");\r\n\r\n        //HAR\r\n        Har har = server.getHar();\r\n        FileOutputStream fos = new FileOutputStream(\"D:\\\\HAR-Information.har\");\r\n        har.writeTo(fos);\r\n        server.stop();\r\n        driver.close();"}}
{"actor":{"display_login":"sourabhs108"}}