HTTP GET request with parameters in body and Content-Type header
We're trying to replace our custom json-parser middleware in our project with grape formatter middleware recently,
and found that if we send a GET request with parameters in body and with application/json Content-Type, parameters will disappear.
It looks like grape doesn't accept this kind of request
https://github.com/ruby-grape/grape/blob/f5d9831bac2e2dd439d0f3901797995a91139690/lib/grape/middleware/formatter.rb#L78-L81
I'm not sure if setting Content-Type HTTP header in GET request is a good practice or not.
Could grape support this just like it do for DELETE in https://github.com/ruby-grape/grape/pull/448? Or add this kind of support into config, so that we can do our own configuration?
Do the RFCs say that you can/cannot have a body on a GET with a content-type? I imagine we'd want to stick to whatever that says.
I don't see a problem parsing a body on a GET, but this is a pretty major breaking change, so it would need to be done carefully, major version upgrade & al. Something configurable (list of methods allowing a body?) may be a good way to start.