Module: Aspera::Mime
- Defined in:
- lib/aspera/mime.rb
Overview
MIME types used in Content-Type and Accept
Constant Summary collapse
- JSON =
JSON body
'application/json'- WWW =
URL encoded form body
'application/x-www-form-urlencoded'- TEXT =
Plain text body
'text/plain'- JSON_API =
JSON:API body (https://jsonapi.org)
'application/vnd.api+json'
Class Method Summary collapse
-
.json?(mime) ⇒ Boolean
Check if a media type is JSON:
application/jsonor structured syntax suffix+json(RFC 6839).
Class Method Details
.json?(mime) ⇒ Boolean
Check if a media type is JSON: application/json or structured syntax suffix +json (RFC 6839)
17 |
# File 'lib/aspera/mime.rb', line 17 def json?(mime) = mime == JSON || mime.end_with?(JSON_SUFFIX) || mime == LEGACY_JSON |