You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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 #448? Or add this kind of support into config, so that we can do our own configuration?
The text was updated successfully, but these errors were encountered:
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.
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 requestgrape/lib/grape/middleware/formatter.rb
Lines 78 to 81 in f5d9831
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 #448? Or add this kind of support into config, so that we can do our own configuration?The text was updated successfully, but these errors were encountered: