MCPcopy
hub / github.com/wavetermdev/waveterm / handleConfigGet

Method handleConfigGet

tsunami/engine/serverhandlers.go:278–286  ·  view source on GitHub ↗
(w http.ResponseWriter, _ *http.Request)

Source from the content-addressed store, hash-verified

276}
277
278func (h *httpHandlers) handleConfigGet(w http.ResponseWriter, _ *http.Request) {
279 result := h.Client.Root.GetConfigMap()
280
281 w.Header().Set("Content-Type", "application/json")
282 if err := json.NewEncoder(w).Encode(result); err != nil {
283 log.Printf("failed to encode config response: %v", err)
284 http.Error(w, "failed to encode response", http.StatusInternalServerError)
285 }
286}
287
288func (h *httpHandlers) handleConfigPost(w http.ResponseWriter, r *http.Request) {
289 body, err := io.ReadAll(r.Body)

Callers 1

handleConfigMethod · 0.95

Calls 4

GetConfigMapMethod · 0.80
SetMethod · 0.45
HeaderMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected