Fixes #14852 - do not pass in "data" param unless needed (#436)
Previously, the "data" param was passed to all oauth requests. This caused issues with `GET` requests, since `data` and `headers` gets mashed into `*arguments`, and then the oauth gem will `shift` off the first argument if there's a `POST` or `PUT` method. The end result was that headers weren't being sent on `GET` requests.
Instead, only supply the "data" param if we are doing a `POST` or `PUT`.
Related issues
Bug #14852: rest_v3.rb does not send headers when 'data' field in request is nil
Fixes #14852 - do not pass in "data" param unless needed (#436)
Previously, the "data" param was passed to all oauth requests. This caused
issues with `GET` requests, since `data` and `headers` gets mashed into
`*arguments`, and then the oauth gem will `shift` off the first argument if
there's a `POST` or `PUT` method. The end result was that headers weren't being
sent on `GET` requests.
Instead, only supply the "data" param if we are doing a `POST` or `PUT`.