Class: Fake::Request
- Inherits:
-
Rack::Request
- Object
- Rack::Request
- Fake::Request
- Defined in:
- lib/fake/request.rb
Instance Method Summary collapse
Instance Method Details
#body_string ⇒ Object
13 14 15 |
# File 'lib/fake/request.rb', line 13 def body_string @body_string ||= body.gets end |
#POST ⇒ Object
4 5 6 7 8 9 10 11 |
# File 'lib/fake/request.rb', line 4 def POST params = super if content_type && content_type.downcase == 'application/json' hash = JSON.parse(body_string) params.merge!(hash) end params end |