From 30e881c3f99b17251a4749c6d5d66f761efad760 Mon Sep 17 00:00:00 2001 From: Clayton Coleman Date: Thu, 24 Jul 2014 17:45:02 -0400 Subject: [PATCH] Write JSON content type for API responses --- pkg/apiserver/apiserver.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/apiserver/apiserver.go b/pkg/apiserver/apiserver.go index f7771c52a6911..853721a599551 100644 --- a/pkg/apiserver/apiserver.go +++ b/pkg/apiserver/apiserver.go @@ -345,6 +345,7 @@ func (server *APIServer) notFound(w http.ResponseWriter, req *http.Request) { } func (server *APIServer) write(statusCode int, object interface{}, w http.ResponseWriter) { + w.Header().Set("Content-Type", "application/json") w.WriteHeader(statusCode) output, err := api.Encode(object) if err != nil {