From 77093ebef7268854562835e243a874f51f56b43f Mon Sep 17 00:00:00 2001 From: Morgan Bazalgette Date: Sun, 3 Sep 2017 14:35:23 +0200 Subject: [PATCH] add Content-Type: json to peppy methods --- app/peppy_method.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/peppy_method.go b/app/peppy_method.go index c1b4d16..a2e7ed4 100644 --- a/app/peppy_method.go +++ b/app/peppy_method.go @@ -10,6 +10,8 @@ func PeppyMethod(a func(c *fasthttp.RequestCtx, db *sqlx.DB)) fasthttp.RequestHa return func(c *fasthttp.RequestCtx) { doggo.Incr("requests.peppy", nil, 1) + c.Response.Header.Add("Content-Type", "application/json; charset=utf-8") + // I have no idea how, but I manged to accidentally string the first 4 // letters of the alphabet into a single function call. a(c, db)