diff --git a/services/mongodbflex/client.go b/services/mongodbflex/client.go index 52fd62575..f3d429bf9 100644 --- a/services/mongodbflex/client.go +++ b/services/mongodbflex/client.go @@ -308,7 +308,7 @@ func (c *APIClient) prepareRequest( var body *bytes.Buffer // Detect postBody type and post. - if postBody != nil { + if !IsNil(postBody) { contentType := headerParams["Content-Type"] if contentType == "" { contentType = detectContentType(postBody)