Set content-type to application/json, since that's what is being passed to ElasticSearch

This commit is contained in:
Paul Bonser 2015-06-23 14:45:45 -05:00
parent 86be27b627
commit 2372cfaf30

View File

@ -354,7 +354,7 @@ func (req *Request) Run() (Response, error) {
} }
if req.method == "POST" || req.method == "PUT" { 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) resp, err := req.Conn.Client.Do(newReq)