From f82254f6d3123a566f39576c086d5c1881f1dce5 Mon Sep 17 00:00:00 2001 From: Paul Bonser Date: Thu, 2 Feb 2017 15:19:08 -0600 Subject: [PATCH] Check correct field to see if body should be empty --- request.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/request.go b/request.go index 00ca68f..9886865 100644 --- a/request.go +++ b/request.go @@ -82,7 +82,7 @@ func (req *Request) Request() (*http.Request, error) { postData = req.Body } else if req.API == "_bulk" { postData = req.BulkData - } else if req.Body != nil { + } else if req.Query != nil { b, err := json.Marshal(req.Query) if err != nil { return nil, err