MCPcopy Create free account
hub / github.com/vercel/examples / writeJSON

Function writeJSON

go/api/internal/handler/handler.go:87–91  ·  view source on GitHub ↗
(w http.ResponseWriter, status int, v any)

Source from the content-addressed store, hash-verified

85}
86
87func writeJSON(w http.ResponseWriter, status int, v any) {
88 w.Header().Set("Content-Type", "application/json")
89 w.WriteHeader(status)
90 json.NewEncoder(w).Encode(v)
91}

Callers 2

handleGetDataMethod · 0.85
handleGetItemMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected