Skip to content

Commit 9b77acc

Browse files
hentersiddontang
authored andcommitted
es request with content-type (#144)
1 parent 39c7b5d commit 9b77acc

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

elastic/client.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ type BulkResponseItem struct {
146146

147147
func (c *Client) DoRequest(method string, url string, body *bytes.Buffer) (*http.Response, error) {
148148
req, err := http.NewRequest(method, url, body)
149+
req.Header.Add("Content-Type", "application/json")
149150
if err != nil {
150151
return nil, errors.Trace(err)
151152
}

0 commit comments

Comments
 (0)