From 262768e3a2298c9ae51bab238b55e2d5483233f6 Mon Sep 17 00:00:00 2001 From: Alexander Kiryukhin Date: Sun, 22 May 2022 02:56:12 +0300 Subject: [PATCH] Fix http transport send headers --- transport/http.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transport/http.go b/transport/http.go index 663bb31..a795b10 100644 --- a/transport/http.go +++ b/transport/http.go @@ -20,8 +20,8 @@ func (h *HTTP) Run(ctx context.Context, resolver Resolver) error { w.WriteHeader(http.StatusMethodNotAllowed) return } + w.Header().Add("Content-Type", "application/json") w.WriteHeader(http.StatusOK) - w.Header().Set("Content-Type", "application/json") resolver.Resolve(ctx, r.Body, w) }), BaseContext: func(l net.Listener) context.Context {