lib/inout.rb
# Simply reads the "Content-Type" header
#
Simply reads the "Content-Type" header
Simply reads the " Content - Type " header
def determine_in_format
    ct = request.env['CONTENT_TYPE'] || ''
    return 'form' if ct.index('form-')
    return 'json' if ct.index('application/json')
    return 'yaml' if ct.index('application/yaml')
    'xml'
  end
def determine_in_format ct = request . env [ 'CONTENT_TYPE' ] || '' return 'form' if ct . index ( 'form-' ) return 'json' if ct . index ( 'application/json' ) return 'yaml' if ct . index ( 'application/yaml' ) 'xml' end
Simply reads the "Content-Type" header
Simply reads the " Content - Type " header