Sha256: 37dc19f812976ec7d67e56370eb86ce2cc3be4577c3fc9e195bcfef08a1eabed
Contents?: true
Size: 584 Bytes
Versions: 13
Compression:
Stored size: 584 Bytes
Contents
module Praxis module Handlers class WWWForm def initialize require 'rack' # superfluous, but might as well be safe end # Parse a URL-encoded WWW form into structured data. def parse(entity) ::Rack::Utils.parse_nested_query(entity) end # Generate a URL-encoded WWW form from structured data. Not implemented since this format # is not very useful for a response body. def generate(structured_data) return nil if structured_data.nil? URI.encode_www_form(structured_data) end end end end
Version data entries
13 entries across 13 versions & 1 rubygems