Processo vivo
GET
/healthz
package main
import ( "fmt" "net/http" "io")
func main() {
url := "https://example.com/healthz"
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))
}const url = 'https://example.com/healthz';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/healthzResponses
Sezione intitolata “Responses”Il processo risponde
Media typeapplication/json
object
status
required
string
version
string
Example
{ "status": "ok"}
