Example usage for org.springframework.ide.eclipse.boot.dash.ngrok NGROKTunnel getName

List of usage examples for org.springframework.ide.eclipse.boot.dash.ngrok NGROKTunnel getName

Introduction

In this page you can find the example usage for org.springframework.ide.eclipse.boot.dash.ngrok NGROKTunnel getName.

Prototype

public String getName() 

Source Link

Usage

From source file:org.springframework.ide.eclipse.boot.dash.ngrok.NGROKClient.java

private void shutdownTunnel(NGROKTunnel ngrokTunnel) {
    try {//www . ja v a  2  s  .  c o m
        String deleteURL = process.getApiURL() + "/api/tunnels/"
                + URLEncoder.encode(ngrokTunnel.getName(), "UTF-8");
        HttpResponse response = Request.Delete(deleteURL).execute().returnResponse();
        if (response.getStatusLine().getStatusCode() != 204) {
            System.err.println("errro closing tunnel");
        }
    } catch (ClientProtocolException e) {
        e.printStackTrace();
    } catch (IOException e) {
        e.printStackTrace();
    }
}