Sha256: 8d217fe26b9710227125cb828ab35a9c1821ea871536cd311e6045bde4082a5e
Contents?: true
Size: 442 Bytes
Versions: 2
Compression:
Stored size: 442 Bytes
Contents
module Acme class ContentType < Grape::API format :json content_type :txt, 'text/plain' content_type :xml, 'application/xml' desc 'Returns a plain text file.' get 'plain_text' do content_type 'text/plain' 'A red brown fox jumped over the road.' end desc 'Returns a response in either XML or JSON format.' get 'mixed' do { data: 'A red brown fox jumped over the road.' } end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
vitals-0.4.0 | integration/multiverse/grape-on-rack/api/content_type.rb |
vitals-0.3.0 | integration/multiverse/grape-on-rack/api/content_type.rb |