Sha256: 854e64d8652265875e2bb5da0a4cdb8f6ffc94b13623e10f41c3a51db228e6f8
Contents?: true
Size: 379 Bytes
Versions: 15
Compression:
Stored size: 379 Bytes
Contents
module BodyParser module_function JSON_TYPE = "application/json" # Parses the body def parse(params, body, content_type) case content_type when JSON_TYPE params.merge(json_parser.parse(body.read)) else params end end def json_parser=(parser_klass) @json_parser = parser_klass end def json_parser @json_parser end end
Version data entries
15 entries across 15 versions & 1 rubygems