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 {