MCPcopy Create free account
hub / github.com/0xUnixIO/pulse / writeNodeJSON

Function writeNodeJSON

internal/ipsentinel/nodehandler.go:234–238  ·  view source on GitHub ↗
(w http.ResponseWriter, status int, payload any)

Source from the content-addressed store, hash-verified

232}
233
234func writeNodeJSON(w http.ResponseWriter, status int, payload any) {
235 w.Header().Set("Content-Type", "application/json; charset=utf-8")
236 w.WriteHeader(status)
237 json.NewEncoder(w).Encode(payload) //nolint:errcheck
238}

Callers 6

handleDetectMethod · 0.85
handleDetectGoogleMethod · 0.85
handleRunMethod · 0.85
handleStatusMethod · 0.85
handleGetConfigMethod · 0.85
handleSetConfigMethod · 0.85

Calls 1

WriteHeaderMethod · 0.80

Tested by

no test coverage detected