From 4300feccd6b993b407fc34fa8e4c199412b8284e Mon Sep 17 00:00:00 2001 From: Pavel Makarenko Date: Wed, 11 Jan 2017 14:41:58 +0300 Subject: [PATCH] Fixed #124: Added Content-Type json to HTTP headers (#125) * Fixed #124: Added Content-Type json to HTTP headers * Moved setting header after creation of request --- controller/endpoint/http.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/controller/endpoint/http.go b/controller/endpoint/http.go index c15a07bc..34c3cd53 100644 --- a/controller/endpoint/http.go +++ b/controller/endpoint/http.go @@ -63,6 +63,8 @@ func (conn *HTTPEndpointConn) Send(msg string) error { if err != nil { return err } + + req.Header.Set("Content-Type", "application/json") resp, err := conn.client.Do(req) if err != nil { return err