MCPcopy Create free account
hub / github.com/Permify/permify / httpJSON

Function httpJSON

internal/authn/openid/fakes_test.go:133–140  ·  view source on GitHub ↗
(w http.ResponseWriter, v interface{})

Source from the content-addressed store, hash-verified

131}
132
133func httpJSON(w http.ResponseWriter, v interface{}) {
134 w.Header().Set("Content-Type", "application/json")
135 encoder := json.NewEncoder(w)
136 encoder.SetIndent("", " ")
137 if err := encoder.Encode(v); err != nil {
138 httpError(w, http.StatusInternalServerError)
139 }
140}
141
142func httpError(w http.ResponseWriter, code int) {
143 http.Error(w, http.StatusText(code), code)

Callers 2

responseWellKnownMethod · 0.85
responseJWKSMethod · 0.85

Calls 3

httpErrorFunction · 0.85
SetMethod · 0.65
EncodeMethod · 0.65

Tested by

no test coverage detected