public JsonObject har ( ) { try { // Request BMP to create a new HAR for this Proxy HttpGet request = new HttpGet ( requestURIBuilder ( ) . setPath ( proxyURIPath ( ) + "/har" ) . build ( ) ) ; // Execute request CloseableHttpResponse response = HTTPclient . execute ( request ) ; // Parse response into JSON JsonObject har = httpResponseToJsonObject ( response ) ; // Close HTTP Response response . close ( ) ; return har ; } catch ( Exception e ) { throw new BMPCUnableToCreateHarException ( e ) ; } }
Produces the HAR so far based on the traffic generated so far .