public void registerCheck(Check check) {

        final URI uri = createURI("/check/register");

        HTTP.Response response = HTTP.jsonRestCallViaPUT(uri.toString(), toJson(check));

        if (response.status() != 200) {
            die("Error removing registration of service with Consul",
                    uri, check, response.status(), response.statusMessageAsString(),
                    response.payloadAsString());
        }
    }
public void registerCheck(Check check) {

        final URI uri = createURI("/check/register");

        HTTP.Response response = HTTP.jsonRestCallViaPUT(uri.toString(), toJson(check));

        if (response.status() != 200) {
            die("Error removing registration of service with Consul",
                    uri, check, response.status(), response.statusMessageAsString(),
                    response.payloadAsString());
        }
    }
public void registerCheck ( Check check ) { final URI uri = createURI ( "/check/register" ) ; HTTP . Response response = HTTP . jsonRestCallViaPUT ( uri . toString ( ) , toJson ( check ) ) ; if ( response . status ( ) != 200 ) { die ( "Error removing registration of service with Consul" , uri , check , response . status ( ) , response . statusMessageAsString ( ) , response . payloadAsString ( ) ) ; } }
Registers a Health Check with the Agent.

@param check The Check to register.
Registers a Health Check with the Agent .