Move the OutputContentType outside

This commit is contained in:
Peter Stuifzand 2018-09-15 15:53:10 +02:00
parent 46b8f2a315
commit 8607a27150
Signed by: peter
GPG Key ID: 374322D56E5209E8

View File

@ -29,6 +29,10 @@ import (
"github.com/gomodule/redigo/redis" "github.com/gomodule/redigo/redis"
) )
const (
OutputContentType = "application/json; charset=utf-8"
)
type microsubHandler struct { type microsubHandler struct {
Backend microsub.Microsub Backend microsub.Microsub
HubIncomingBackend HubBackend HubIncomingBackend HubBackend
@ -69,7 +73,6 @@ func (h *microsubHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
} }
} }
const OutputContentType = "application/json; charset=utf-8"
if r.Method == http.MethodGet { if r.Method == http.MethodGet {
w.Header().Add("Access-Control-Allow-Origin", "*") w.Header().Add("Access-Control-Allow-Origin", "*")
values := r.URL.Query() values := r.URL.Query()