Skip to content

armgit / ODS

Public Imported from GitHub
0

ODS V3 Pre-Release: Public testing and refinement ahead of the official V3 launch. Turn your PC, Mac, or Linux box into a private AI server.

413 B
Raw Blame
package main

import (
    "net/http"
    "os"
    "time"
)

func main() {
    client := &http.Client{Timeout: 5 * time.Second, CheckRedirect: func(*http.Request, []*http.Request) error { return http.ErrUseLastResponse }}
    response, err := client.Get("http://127.0.0.1:13133/status")
    if err != nil { os.Exit(1) }
    defer response.Body.Close()
    if response.StatusCode != http.StatusOK { os.Exit(1) }
}