public void pingAgent ( ) { HTTP . Response response = HTTP . getResponse ( createURI ( "/self" ) . toString ( ) ) ; if ( response . status ( ) != 200 ) { die ( "Error pinging Consul" , response . payloadAsString ( ) ) ; } }
Pings the Consul Agent .