From ace31ceefd95b8e8cc22ee3c4c459336d4ab87bf Mon Sep 17 00:00:00 2001 From: Evgeniy Kulikov Date: Tue, 26 Jan 2021 11:43:40 +0300 Subject: [PATCH] Add `application/json` Content-Type header Signed-off-by: Evgeniy Kulikov --- upload.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/upload.go b/upload.go index f5e4324..0850cf6 100644 --- a/upload.go +++ b/upload.go @@ -21,6 +21,8 @@ type putResponse struct { CID string `json:"container_id"` } +const jsonHeader = "application/json; charset=UTF-8" + func newPutResponse(addr *object.Address) *putResponse { return &putResponse{ OID: addr.ObjectID().String(), @@ -149,4 +151,5 @@ func (a *app) upload(c *fasthttp.RequestCtx) { } c.Response.SetStatusCode(fasthttp.StatusOK) + c.Response.Header.SetContentType(jsonHeader) }