From 9961e0f4d69cde20383a36388c76470a5e581d9f Mon Sep 17 00:00:00 2001 From: Victor Marmol Date: Mon, 27 Oct 2014 08:32:50 -0700 Subject: [PATCH] Output correct content-type with API responses. Fixes #281 --- api/handler.go | 1 + 1 file changed, 1 insertion(+) diff --git a/api/handler.go b/api/handler.go index c155c110..4bae120f 100644 --- a/api/handler.go +++ b/api/handler.go @@ -191,6 +191,7 @@ func writeResult(res interface{}, w http.ResponseWriter) error { return fmt.Errorf("failed to marshall response %+v with error: %s", res, err) } + w.Header().Set("Content-Type", "application/json") w.Write(out) return nil }