API key
Production hardening
- Use a typed client, configurable timeouts (
http.Client{Timeout: ...}), and retry with backoff on 429 / 502. - Parse RFC 7807 problem JSON on error responses (
application/problem+json).
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Minimal Go client using the standard library.
package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
base := getenv("HOJ_API_BASE", "https://staging.api.hofj.com")
key := os.Getenv("HOJ_API_KEY")
req, _ := http.NewRequest(http.MethodGet, base+"/v1/products?limit=5&brand=Weebora&locale=it", nil)
req.Header.Set("Authorization", "Bearer "+key)
req.Header.Set("Accept", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}
func getenv(k, def string) string {
if v := os.Getenv(k); v != "" {
return v
}
return def
}
http.Client{Timeout: ...}), and retry with backoff on 429 / 502.application/problem+json).