class Sentry::RequestInterface

def read_data_from(request)

def read_data_from(request)
  if request.form_data?
    request.POST
  elsif request.body # JSON requests, etc
    data = request.body.read(MAX_BODY_LIMIT)
    data = Utils::EncodingHelper.encode_to_utf_8(data.to_s)
    request.body.rewind
    data
  end
rescue IOError => e
  e.message
end