Using plus sign in custom internet media types (MI

2019-04-18 11:11发布

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 "+"?

1条回答
闹够了就滚
2楼-- · 2019-04-18 12:04

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.

查看更多
登录 后发表回答