Merge pull request #28 from pib/fix_content_type

Set content-type to application/json, since that's what is being passed to ElasticSearch
This commit is contained in:
Jérôme Renard 2015-07-04 22:04:52 +02:00
commit 673f67dbdb

View File

@ -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)