Sha256: 506ed29848f8cfc3785b6210b76628e5b14ebc252cec8e489da494afa5cb3bef

Contents?: true

Size: 929 Bytes

Versions: 7

Compression:

Stored size: 929 Bytes

Contents

module Rack; module LinkedData
  ##
  # Rack middleware for Linked Data content negotiation.
  #
  # Uses HTTP Content Negotiation to find an appropriate RDF
  # format to serialize any result with a body being `RDF::Enumerable`.
  #
  # Override content negotiation by setting the :format option to
  # `#initialize`.
  #
  # Add a :default option to set a content type to use when nothing else
  # is found.
  #
  # @example
  #     use Rack::LinkedData::ContentNegotation, :format => :ttl
  #     use Rack::LinkedData::ContentNegotiation, :format => RDF::NTriples::Format
  #     use Rack::LinkedData::ContentNegotiation, :default => 'application/rdf+xml'
  #
  # @see http://www4.wiwiss.fu-berlin.de/bizer/pub/LinkedDataTutorial/
  # @see https://www.rubydoc.info/github/rack/rack/master/file/SPEC
  class ContentNegotiation < Rack::RDF::ContentNegotiation
  end # class ContentNegotiation
end; end # module Rack::LinkedData

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
rack-linkeddata-3.3.1 lib/rack/linkeddata/conneg.rb
rack-linkeddata-3.3.0 lib/rack/linkeddata/conneg.rb
rack-linkeddata-3.2.3 lib/rack/linkeddata/conneg.rb
rack-linkeddata-3.2.1 lib/rack/linkeddata/conneg.rb
rack-linkeddata-3.1.3 lib/rack/linkeddata/conneg.rb
rack-linkeddata-3.1.2 lib/rack/linkeddata/conneg.rb
rack-linkeddata-3.1.1 lib/rack/linkeddata/conneg.rb