From cc00fce37f1086f909eef4fff24f4461f8fa6d6c Mon Sep 17 00:00:00 2001 From: Hunter Long Date: Tue, 14 Aug 2018 22:26:20 -0700 Subject: [PATCH] content type --- Makefile | 2 +- cmd/server.go | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index d77a8b0..a471c53 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -VERSION=1.54 +VERSION=1.55 GOBIN=go GOGET=$(GOBIN) get GOINSTALL=$(GOBIN) install diff --git a/cmd/server.go b/cmd/server.go index c965f4f..fea195a 100644 --- a/cmd/server.go +++ b/cmd/server.go @@ -43,9 +43,11 @@ func getTokenHandler(w http.ResponseWriter, r *http.Request) { Error: true, Message: err.Error(), } + w.Header().Set("Content-Type", "application/json") w.WriteHeader(http.StatusNotFound) json.NewEncoder(w).Encode(m) } else { + w.Header().Set("Content-Type", "application/json") w.WriteHeader(http.StatusOK) json.NewEncoder(w).Encode(query.ToJSON()) }