code: public void close() {
          try {
              // Request BMP to create a new HAR for this Proxy
              HttpDelete shutdownProxyDELETE = new HttpDelete(requestURIBuilder()
                      .setPath(proxyURIPath())
                      .build());
  
              // Execute request
              CloseableHttpResponse response = HTTPclient.execute(shutdownProxyDELETE);
  
              // Check request was successful
              int statusCode = response.getStatusLine().getStatusCode();
              if (statusCode != 200) {
                  throw new BMPCUnableToCloseProxyException(String.format(
                          "Invalid HTTP Response when attempting to close " +
                                  "Proxy '%d'. Status code: %d",
                          proxyPort, statusCode));
              }
              // Close HTTP Response
              response.close();
  
              // Close HTTP Client
              HTTPclient.close();
          } catch (Exception e) {
              throw new BMPCUnableToCloseProxyException(e);
          }
      }
docs: Closes the Proxy and releases the Proxy Client resources (ex. HTTPClient).
  
  After this call the Proxy Client is rendered unusable and references
  to it should be discarded.