Module Sinatra::RespondTo
In: lib/sinatra/respond_to.rb

Methods

Classes and Modules

Module Sinatra::RespondTo::Helpers
Class Sinatra::RespondTo::MissingTemplate

Constants

SUPPORTED_ACCEPT_HEADERS = { :xml => [ 'text/xml', 'application/xml'   Define all MIME types you want to support here. This conversion table will be used for auto-negotiation with browser in sinatra when no ‘format’ parameter is specified.

External Aliases

render -> render_without_format
  This code was copied from respond_to plugin github.com/cehoffman/sinatra-respond_to MIT License

Public Class methods

Public Instance methods

We need to pass array of available response types to best_media_type method

Simple helper to detect Chrome based browsers which have screwed up they Accept headers. Set HTML as default output format here

Then, when we get best media type for response, we need to know which format to choose

[Validate]