Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using plus sign in custom internet media types (MIME types)

I'm building a RESTful web service, and I'm creating some custom media types. It seems like in media types the subtype becomes more specific as you go right to left using '+'. So for example:

application/json is more general than application/hal+json, since HAL adds more restrictions on top of json.

My question is whether this is standard, or just a convention (I've poked through some of the RFCs on MIME types and I couldn't find anything, but I may not have looked hard enough).

If it is standard, does it generalize so I can add even more specific subtypes like application/vnd.custom.mime+hal+json or is it limited to one "+"?

like image 504
deontologician Avatar asked Jul 19 '12 20:07

deontologician


People also ask

What is the difference between MIME type and media type?

(Internet) Media Type is the proper technical term. Content-Type is the name of the HTTP header field used to specify the media type. MIME Type is the former name for Media Type.

How do I specify a MIME type?

A MIME type has two parts: a type and a subtype. They are separated by a slash (/). For example, the MIME type for Microsoft Word files is application and the subtype is msword. Together, the complete MIME type is application/msword.

How do I fix MIME type error?

To Solve MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled ErrorJust make Sure Your File name and the name You are Using in Link Tag Both Are Same. For Example my File name is style. css Then My Link tag is Something like this:<link rel=”stylesheet” href=”style.

What is MIME type example?

MIME types enable browsers to recognize the filetype of a file which has been sent via HTTP by the webserver. As a result the browser is able to choose a suitable displaying method. Common MIME types are for example text/html for html-files or image/jpeg for jpeg-files.


1 Answers

The procedure for registering new suffixes is now defined in http://trac.tools.ietf.org/html/draft-ietf-appsawg-media-type-regs-14#section-6.

"+json" will be defined in a separate document; right now: http://trac.tools.ietf.org/html/draft-ietf-appsawg-media-type-suffix-regs-02#section-3.1

And no, you are not supposed to have multiple subtypes there.

like image 146
Julian Reschke Avatar answered Sep 28 '22 00:09

Julian Reschke



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!