MCPcopy Create free account
hub / github.com/mediachain/concat / apiConfigMethod

Function apiConfigMethod

mcnode/api.go:1002–1014  ·  view source on GitHub ↗

config api

(w http.ResponseWriter, r *http.Request, getf, setf http.HandlerFunc)

Source from the content-addressed store, hash-verified

1000
1001// config api
1002func apiConfigMethod(w http.ResponseWriter, r *http.Request, getf, setf http.HandlerFunc) {
1003 switch r.Method {
1004 case http.MethodHead:
1005 return
1006 case http.MethodGet:
1007 getf(w, r)
1008 case http.MethodPost:
1009 setf(w, r)
1010
1011 default:
1012 apiError(w, http.StatusBadRequest, BadMethod)
1013 }
1014}
1015
1016// GET /config/dir
1017// POST /config/dir

Callers 5

httpConfigDirMethod · 0.85
httpConfigNATMethod · 0.85
httpConfigInfoMethod · 0.85
httpAuthPeerMethod · 0.85
httpManifestMethod · 0.85

Calls 1

apiErrorFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…