class Praxis::Handlers::WWWForm
Public Class Methods
Source
# File lib/praxis/handlers/www_form.rb, line 11 def initialize require 'rack' # superfluous, but might as well be safe end
Public Instance Methods
Source
# File lib/praxis/handlers/www_form.rb, line 22 def generate(structured_data) return nil if structured_data.nil? URI.encode_www_form(structured_data) end
Generate a URL-encoded WWW form from structured data. Not implemented since this format is not very useful for a response body.
Source
# File lib/praxis/handlers/www_form.rb, line 16 def parse(entity) ::Rack::Utils.parse_nested_query(entity) end
Parse a URL-encoded WWW form into structured data.