Sha256: 28215cb65cd3e2d2d0a48fa1e949805a72e6078982e1593c848d1dc161195252
Contents?: true
Size: 609 Bytes
Versions: 7
Compression:
Stored size: 609 Bytes
Contents
require "rack" require "json" module Getto module Roda module Decode class Post def initialize(content_type, body) @content_type = content_type @body = body end def to_h return unless @content_type == "application/json" ::JSON.parse @body rescue ::JSON::ParserError nil end end class Get def initialize(query_string) @query_string = query_string end def to_h ::Rack::Utils.parse_nested_query(@query_string) end end end end end
Version data entries
7 entries across 7 versions & 1 rubygems