aboutsummaryrefslogtreecommitdiff
path: root/pkg/api/handlers/utils/handler.go
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2020-01-15 12:22:56 +0100
committerValentin Rothberg <rothberg@redhat.com>2020-01-15 12:49:47 +0100
commit0f6955c30e26b5d8bad4eb2360993e7e3cf708d6 (patch)
tree9e5084cb20beed286fbdc9e4576b1c9d72061b73 /pkg/api/handlers/utils/handler.go
parent3c7b7761ceafc24f9fa42e5f08178d8c644d9017 (diff)
downloadpodman-0f6955c30e26b5d8bad4eb2360993e7e3cf708d6.tar.gz
podman-0f6955c30e26b5d8bad4eb2360993e7e3cf708d6.tar.bz2
podman-0f6955c30e26b5d8bad4eb2360993e7e3cf708d6.zip
v2: stats: fix errors
Also add some comments. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'pkg/api/handlers/utils/handler.go')
-rw-r--r--pkg/api/handlers/utils/handler.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/pkg/api/handlers/utils/handler.go b/pkg/api/handlers/utils/handler.go
index 8c2110f97..65698bfd3 100644
--- a/pkg/api/handlers/utils/handler.go
+++ b/pkg/api/handlers/utils/handler.go
@@ -33,6 +33,7 @@ func WriteResponse(w http.ResponseWriter, code int, value interface{}) {
}
func WriteJSON(w http.ResponseWriter, code int, value interface{}) {
+ // FIXME: we don't need to write the header in all/some circumstances.
w.Header().Set("Content-Type", "application/json")
w.WriteHeader(code)