We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e6db7e7 commit 3be0f54Copy full SHA for 3be0f54
README.markdown
@@ -143,6 +143,19 @@ along with any named parameters you specify in your route strings.
143
end
144
```
145
146
+Parameters are also populated from the request body on POST and PUT for JSON and XML content-types.
147
+
148
+The Request:
149
+```curl -d '{"some_key": "some_value"}' 'http://readercity.com/json_endpoint' -H Content-Type:application/json -v```
150
151
152
+The Grape Endpoint:
153
+```ruby
154
+ post '/json_endpoint' do
155
+ params[:some_key]
156
+ end
157
+```
158
159
## Headers
160
161
Headers are available through the `env` hash object.
0 commit comments