class Fake::Request

Public Instance Methods

POST() click to toggle source
Calls superclass method
# 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
body_string() click to toggle source
# File lib/fake/request.rb, line 13
def body_string
  @body_string ||= body.gets
end