Monitor the health of your JWTPlus service with this endpoint.
curl --request GET \
--url {{your-endpoint}}:{{your-port-number}}/health
const request = require('request');
const options = {method: 'GET', url: '{{your-endpoint}}:{{your-port-number}}/health'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
}
import http.client
conn = http.client.HTTPConnection("localhost:1234")
conn.request("GET", "/health")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('GET', 'http://localhost:1234/health');
echo $response->getBody();
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:1234/health"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "http://localhost:1234/health")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();