Set content-type to application/json, since that's what is being passed to ElasticSearch
This commit is contained in:
parent
86be27b627
commit
2372cfaf30
2
goes.go
2
goes.go
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user