From 2372cfaf30df053f0bf282ef57c1cf6b5f2a62b0 Mon Sep 17 00:00:00 2001 From: Paul Bonser Date: Tue, 23 Jun 2015 14:45:45 -0500 Subject: [PATCH] Set content-type to application/json, since that's what is being passed to ElasticSearch --- goes.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/goes.go b/goes.go index 5637228..0cf0471 100644 --- a/goes.go +++ b/goes.go @@ -354,7 +354,7 @@ func (req *Request) Run() (Response, error) { } if req.method == "POST" || req.method == "PUT" { - newReq.Header.Set("Content-Type", "application/x-www-form-urlencoded") + newReq.Header.Set("Content-Type", "application/json") } resp, err := req.Conn.Client.Do(newReq)