From 9d2e52aec347cd9270a07ece2703d78bb7fb9c04 Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Thu, 31 Mar 2022 02:15:16 +0400 Subject: [PATCH] Added missing JSON Content-Type. --- internal/handlers/handlers.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/handlers/handlers.go b/internal/handlers/handlers.go index 9c5e7f7..6eb917d 100644 --- a/internal/handlers/handlers.go +++ b/internal/handlers/handlers.go @@ -83,6 +83,7 @@ func (h *RadioHandlers) Stats(w http.ResponseWriter, _ *http.Request) { return } + w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(status) } @@ -96,6 +97,8 @@ func (h *RadioHandlers) LastSong(w http.ResponseWriter, _ *http.Request) { w.WriteHeader(http.StatusNotFound) return } + + w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(songs[0]) }