Module: Ippon::Roda::InstanceMethods
- Defined in:
- lib/ippon/roda.rb
Instance Method Summary collapse
Instance Method Details
#body_data ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/ippon/roda.rb', line 6 def body_data @body_data ||= if request.content_type == "application/x-www-form-urlencoded" Ippon::FormData::URLEncoded.parse(request.body.read) else Ippon::FormData::URLEncoded.new end end |
#form_data ⇒ Object
18 19 20 |
# File 'lib/ippon/roda.rb', line 18 def form_data request.get? ? query_data : body_data end |
#query_data ⇒ Object
14 15 16 |
# File 'lib/ippon/roda.rb', line 14 def query_data @query_data ||= Ippon::FormData::URLEncoded.parse(request.query_string) end |