From 51a90e59e3f7923268a4f90106759d55558c720f Mon Sep 17 00:00:00 2001 From: Carter Klein Date: Thu, 7 Jan 2021 19:05:54 -0500 Subject: [PATCH] Standardizing API responses --- pkg/http/rest/handler.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/http/rest/handler.go b/pkg/http/rest/handler.go index 3ae85f2..86399fd 100644 --- a/pkg/http/rest/handler.go +++ b/pkg/http/rest/handler.go @@ -284,6 +284,8 @@ func listAttributes(d dashboard.Service) func(w http.ResponseWriter, r *http.Req return } + // TODO we want to create a standard API response + w.Header().Set("Content-Type", "application/json") json.NewEncoder(w).Encode(observations) }