diff --git a/elastic/client.go b/elastic/client.go index 659a5871..85b79f86 100644 --- a/elastic/client.go +++ b/elastic/client.go @@ -146,6 +146,7 @@ type BulkResponseItem struct { func (c *Client) DoRequest(method string, url string, body *bytes.Buffer) (*http.Response, error) { req, err := http.NewRequest(method, url, body) + req.Header.Add("Content-Type", "application/json") if err != nil { return nil, errors.Trace(err) }