Verificar saude da API
curl --request GET \
--url http://localhost:4000/healthconst options = {method: 'GET'};
fetch('http://localhost:4000/health', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "http://localhost:4000/health"
response = requests.get(url)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:4000/health"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"ok": true
}Verificar saude da API
GET
/
health
Verificar saude da API
curl --request GET \
--url http://localhost:4000/healthconst options = {method: 'GET'};
fetch('http://localhost:4000/health', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "http://localhost:4000/health"
response = requests.get(url)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:4000/health"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"ok": true
}Response
200 - application/json
API disponivel