Html Mime Types

MIME Types An API can accept and return data in different formats, the most common being JSON and XML. You can use the consumes and produces keywords to specify the MIME types understood by your API. The value of consumes and produces is an array of MIME types. Global MIME types can be defined on the root level of an API specification and are. MIME Type File Extension; Corel Envoy: application/envoy: evy: fractal image file: application/fractals: fif: Windows print spool file: application/futuresplash: spl: HTML application: application/hta: hta: Atari ST Program: application/internet-property-stream: acx: BinHex encoded file: application/mac-binhex40: hqx: Word document: application/msword: doc: Word document template. However, now I can only see the HTML text without the CSS themes and the JS functionality. The Crome browser console prints these errors: Refused to apply style from ' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

Encapsulates the notion of a MIME type. Can be used at render time, for example, with:

  • CLASSMime::Type::InvalidMimeType
Methods
#
  • ,
  • ,
A
E
H
L
  • lookup,
M
N
P
  • parse,
  • parse_data_with_trailing_star,
R
  • ref,
  • register,
  • register_alias,
T
  • to_s,
  • to_str,
U
MIME_NAME='[a-zA-Z0-9][a-zA-Z0-9#{Regexp.escape('!#$&-^_.+')}]{0,126}'
MIME_PARAMETER='s*;s*#{MIME_PARAMETER_KEY}(?:=#{MIME_PARAMETER_VALUE})?'
MIME_PARAMETER_KEY='[a-zA-Z0-9][a-zA-Z0-9#{Regexp.escape('!#$&-^_.+')}]{0,126}'
MIME_PARAMETER_VALUE='#{Regexp.escape('')}?[a-zA-Z0-9][a-zA-Z0-9#{Regexp.escape('!#$&-^_.+')}]{0,126}#{Regexp.escape('')}?'
MIME_REGEXP=/A(?:*/*|#{MIME_NAME}/(?:*|#{MIME_NAME})(?:s*#{MIME_PARAMETER}s*)*)z/
PARAMETER_SEPARATOR_REGEXP=/;s*w+='?w+'?/
TRAILING_STAR_REGEXP=/^(text|application)/*/
Attributes
[R] hash
[R] string
[R] symbol
[R] synonyms

Source: show | on GitHub

Source: show | on GitHub

Source: show | on GitHub

Source: show | on GitHub

For an input of 'text', returns [Mime[:json], Mime[:xml], Mime[:ics], Mime[:html], Mime[:css], Mime[:csv], Mime[:js], Mime[:yaml], Mime[:text].

For an input of 'application', returns [Mime[:html], Mime[:js], Mime[:xml], Mime[:yaml], Mime[:atom], Mime[:json], Mime[:rss], Mime[:url_encoded_form].

Source: show | on GitHub

Source: show | on GitHub

register(string, symbol, mime_type_synonyms = [], extension_synonyms = [], skip_lookup = false) Link
Html mime type header

Source: show | on GitHub

Html Mime Types
register_alias(string, symbol, extension_synonyms = []) Link

Registers an alias that's not used on MIME type lookup, but can be referenced directly. Especially useful for rendering different HTML versions depending on the user agent, like an iPhone.

Source: show | on GitHub

Mime Types Text

Source: show | on GitHub

This method is opposite of register method.

To unregister a MIME type:

Source: show | on GitHub

Instance Public methods

Source: show | on GitHub

Source: show | on GitHub

Source: show | on GitHub

Source: show | on GitHub

Source: show | on GitHub

Source: show | on GitHub

Source: show | on GitHub

Html Mime Type Text/html

Source: show | on GitHub

Source: show | on GitHub

Source: show | on GitHub

Html Mime Types List

Source: show | on GitHub