(w http.ResponseWriter, _ *http.Request)
| 276 | } |
| 277 | |
| 278 | func (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 | |
| 288 | func (h *httpHandlers) handleConfigPost(w http.ResponseWriter, r *http.Request) { |
| 289 | body, err := io.ReadAll(r.Body) |
no test coverage detected