From a70d608178afa293697f4df11a7dac73d9dddc0a Mon Sep 17 00:00:00 2001 From: Xavier MARCELET Date: Wed, 18 Aug 2021 16:11:23 +0200 Subject: [PATCH] fix missing content-type header --- aggregate_handler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aggregate_handler.go b/aggregate_handler.go index 3deda7f..dabb3a8 100644 --- a/aggregate_handler.go +++ b/aggregate_handler.go @@ -107,8 +107,8 @@ func (a AggregateHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) { return true }) - w.WriteHeader(finalCode) w.Header().Set("Content-Type", "application/json") + w.WriteHeader(finalCode) marshaler := json.NewEncoder(w) err := marshaler.Encode(finalMap) if err != nil {